Fix examples/multitouch dividing by zero

This commit is contained in:
JustSoup321 2024-07-23 20:39:14 -04:00 committed by Héctor Ramón Jiménez
parent 295aae4faa
commit a497d12320
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -126,7 +126,7 @@ impl canvas::Program<Message> for Multitouch {
let path = builder.build();
let color_r = (10 % zone.0) as f32 / 20.0;
let color_r = (10 % (zone.0 + 1)) as f32 / 20.0;
let color_g = (10 % (zone.0 + 8)) as f32 / 20.0;
let color_b = (10 % (zone.0 + 3)) as f32 / 20.0;