Open
Bug 1857978
Opened 3 years ago
normalize_hue could use rem_euclid
Categories
(Core :: CSS Parsing and Computation, task)
Core
CSS Parsing and Computation
Tracking
()
NEW
People
(Reporter: mstange, Unassigned)
Details
/// Normalize hue into [0, 360).
#[inline]
fn normalize_hue(hue: f32) -> f32 {
hue - 360. * (hue / 360.).floor()
}
I think this could just be hue.rem_euclid(360.) . This method was stabilized in Rust 1.38.
You need to log in
before you can comment on or make changes to this bug.
Description
•