Skip to content

Commit

Permalink
Merge pull request #2517 from JustSoup312/multitouch
Browse files Browse the repository at this point in the history
Fix examples/multitouch dividing by zero
  • Loading branch information
hecrj authored Sep 12, 2024
2 parents 74bb935 + a497d12 commit b7ba613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/multitouch/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b7ba613

Please sign in to comment.