diff --git a/src/main.rs b/src/main.rs index e6fac2f..ab9ef2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -557,7 +557,7 @@ fn gen_svg() -> Document { local_hour, local_minute, local_second ))); - let top_pos = if local_hour > 6 && local_hour < 18 { + let top_pos = if (6..=18).contains(&local_hour) { moon_radius * 1.5 // under the moon } else { 0.0 - moon_radius * 1.5 - current_box_height // above the moon