File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -970,6 +970,7 @@ impl f32 {
970970 /// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
971971 /// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
972972 /// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
973+ /// assert!((std::f32::NAN).clamp(-2.0f32, 1.0f32).is_nan());
973974 /// ```
974975 #[ unstable( feature = "clamp" , issue = "44095" ) ]
975976 #[ inline]
Original file line number Diff line number Diff line change @@ -892,6 +892,7 @@ impl f64 {
892892 /// assert!((-3.0f64).clamp(-2.0f64, 1.0f64) == -2.0f64);
893893 /// assert!((0.0f64).clamp(-2.0f64, 1.0f64) == 0.0f64);
894894 /// assert!((2.0f64).clamp(-2.0f64, 1.0f64) == 1.0f64);
895+ /// assert!((std::f64::NAN).clamp(-2.0f32, 1.0f32).is_nan());
895896 /// ```
896897 #[ unstable( feature = "clamp" , issue = "44095" ) ]
897898 #[ inline]
You can’t perform that action at this time.
0 commit comments