mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
@@ -138,7 +138,9 @@ fn test_aim() {
|
||||
assert_eq!(best_in_range_f64(99.999, 100.000), 100.0);
|
||||
assert_eq!(best_in_range_f64(10.001, 100.001), 100.0);
|
||||
|
||||
use std::f64::{INFINITY, NAN, NEG_INFINITY};
|
||||
const NAN: f64 = f64::NAN;
|
||||
const INFINITY: f64 = f64::INFINITY;
|
||||
const NEG_INFINITY: f64 = f64::NEG_INFINITY;
|
||||
assert!(best_in_range_f64(NAN, NAN).is_nan());
|
||||
assert_eq!(best_in_range_f64(NAN, 1.2), 1.2);
|
||||
assert_eq!(best_in_range_f64(NAN, INFINITY), INFINITY);
|
||||
|
||||
Reference in New Issue
Block a user