diff options
author | 2025-01-16 12:17:28 +0000 | |
---|---|---|
committer | 2025-01-16 12:18:23 +0000 | |
commit | d9a732994f0ac426fabcf189b4ec1014f9af96ab (patch) | |
tree | f5df7a690aba850e31fd9af22001428b15f9d4e1 /examples/clock/src/main.rs | |
parent | 10e5362c04b968e9e708287dece4b167d4040570 (diff) | |
download | iced-d9a732994f0ac426fabcf189b4ec1014f9af96ab.tar.gz iced-d9a732994f0ac426fabcf189b4ec1014f9af96ab.tar.bz2 iced-d9a732994f0ac426fabcf189b4ec1014f9af96ab.zip |
Simplify tick drawing logic in `clock` example
Diffstat (limited to '')
-rw-r--r-- | examples/clock/src/main.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index 0aa54d3a..7d11a3b5 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -182,9 +182,7 @@ impl<Message> canvas::Program<Message> for Clock { // Draw ticks for tick in 0..60 { - let angle = Radians::from(hand_rotation(tick, 60)) - - Radians::from(Degrees(90.0)); - + let angle = hand_rotation(tick, 60); let width = if tick % 5 == 0 { 3.0 } else { 1.0 }; frame.with_save(|frame| { |