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 {
970
970
/// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
971
971
/// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
972
972
/// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
973
+ /// assert!((std::f32::NAN).clamp(-2.0f32, 1.0f32).is_nan());
973
974
/// ```
974
975
#[ unstable( feature = "clamp" , issue = "44095" ) ]
975
976
#[ inline]
Original file line number Diff line number Diff line change @@ -892,6 +892,7 @@ impl f64 {
892
892
/// assert!((-3.0f64).clamp(-2.0f64, 1.0f64) == -2.0f64);
893
893
/// assert!((0.0f64).clamp(-2.0f64, 1.0f64) == 0.0f64);
894
894
/// assert!((2.0f64).clamp(-2.0f64, 1.0f64) == 1.0f64);
895
+ /// assert!((std::f64::NAN).clamp(-2.0f32, 1.0f32).is_nan());
895
896
/// ```
896
897
#[ unstable( feature = "clamp" , issue = "44095" ) ]
897
898
#[ inline]
You can’t perform that action at this time.
0 commit comments