Skip to content

Commit

Permalink
Fix examples/multitouch dividing by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSoup321 authored and hecrj committed Sep 12, 2024
1 parent 295aae4 commit a497d12
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 a497d12

Please sign in to comment.