Skip to content

Commit d9a7329

Browse files
committed
Simplify tick drawing logic in clock example
1 parent 10e5362 commit d9a7329

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

examples/clock/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ impl<Message> canvas::Program<Message> for Clock {
182182

183183
// Draw ticks
184184
for tick in 0..60 {
185-
let angle = Radians::from(hand_rotation(tick, 60))
186-
- Radians::from(Degrees(90.0));
187-
185+
let angle = hand_rotation(tick, 60);
188186
let width = if tick % 5 == 0 { 3.0 } else { 1.0 };
189187

190188
frame.with_save(|frame| {

0 commit comments

Comments
 (0)