1
0
Fork 0

Fix decimals in snapping test

This commit is contained in:
Robbert van der Helm 2022-02-13 18:07:19 +01:00
parent 990072f529
commit 99fe9e865b

View file

@ -252,7 +252,8 @@ mod tests {
fn step_size() { fn step_size() {
// These are weird step sizes, but if it works here then it will work for anything // These are weird step sizes, but if it works here then it will work for anything
let range = make_linear_float_range(); let range = make_linear_float_range();
assert_eq!(range.snap_to_step(13.0, 4.73), 14.49); // XXX: We round to decimal places when outputting, but not when snapping to steps
assert_eq!(range.snap_to_step(13.0, 4.73), 14.190001);
} }
#[test] #[test]