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 @@ -1089,6 +1089,7 @@ impl f32 {
1089
1089
/// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
1090
1090
/// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
1091
1091
/// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
1092
+ /// assert!((NAN).clamp(-2.0f32, 1.0f32) == NAN);
1092
1093
/// ```
1093
1094
#[ unstable( feature = "clamp" , issue = "44095" ) ]
1094
1095
#[ inline]
Original file line number Diff line number Diff line change @@ -979,6 +979,7 @@ impl f64 {
979
979
/// assert!((-3.0f64).clamp(-2.0f64, 1.0f64) == -2.0f64);
980
980
/// assert!((0.0f64).clamp(-2.0f64, 1.0f64) == 0.0f64);
981
981
/// assert!((2.0f64).clamp(-2.0f64, 1.0f64) == 1.0f64);
982
+ /// assert!((NAN).clamp(-2.0f64, 1.0f64) == NAN);
982
983
/// ```
983
984
#[ unstable( feature = "clamp" , issue = "44095" ) ]
984
985
#[ inline]
You can’t perform that action at this time.
0 commit comments