mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Fix float eq check
This commit is contained in:
1 parent
9d61130b44
commit
8618c86421
1 file changed
+2
-2
+2
-2
@@ -137,8 +137,8 @@ pub fn write_benchmark_comparison(results: &[BenchmarkResult]) {
|
||||
|
||||
#[test]
|
||||
fn test_max() {
|
||||
let assert_float_eq = |a, b| {
|
||||
assert!((a - b) < f64::EPSILON);
|
||||
let assert_float_eq = |a: f64, b: f64| {
|
||||
assert!((a - b).abs() < f64::EPSILON);
|
||||
};
|
||||
|
||||
assert_float_eq(1.0, max(&[1.0]));
|
||||
|
||||
Reference in new issue
Block a user