Skip to content
Myr

Fix float eq check

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 9d61130 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/internal.rs+2 added-2 removed
135 unmodified lines
136}137138#[test]139fn test_max() {140 let assert_float_eq = |a, b| {141 assert!((a - b) < f64::EPSILON);140 let assert_float_eq = |a: f64, b: f64| {141 assert!((a - b).abs() < f64::EPSILON);142 };143144 assert_float_eq(1.0, max(&[1.0]));145 assert_float_eq(-1.0, max(&[-1.0]));
110 unmodified lines