Merge pull request #2517 from JustSoup312/multitouch

Fix examples/multitouch dividing by zero
This commit is contained in:
Héctor Ramón 2024-09-13 01:41:29 +02:00 committed by GitHub
commit b7ba613dbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;