Add NAN test to docs
This commit is contained in:
parent
9c499ccfcd
commit
2f8d9a23ee
2 changed files with 2 additions and 0 deletions
|
|
@ -970,6 +970,7 @@ impl f32 {
|
|||
/// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
|
||||
/// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
|
||||
/// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
|
||||
/// assert!((std::f32::NAN).clamp(-2.0f32, 1.0f32).is_nan());
|
||||
/// ```
|
||||
#[unstable(feature = "clamp", issue = "44095")]
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -892,6 +892,7 @@ impl f64 {
|
|||
/// assert!((-3.0f64).clamp(-2.0f64, 1.0f64) == -2.0f64);
|
||||
/// assert!((0.0f64).clamp(-2.0f64, 1.0f64) == 0.0f64);
|
||||
/// assert!((2.0f64).clamp(-2.0f64, 1.0f64) == 1.0f64);
|
||||
/// assert!((std::f64::NAN).clamp(-2.0f32, 1.0f32).is_nan());
|
||||
/// ```
|
||||
#[unstable(feature = "clamp", issue = "44095")]
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue