diff options
| author | Jacob Kiesel <kieseljake@gmail.com> | 2017-09-08 16:07:15 -0600 |
|---|---|---|
| committer | Jacob Kiesel <kieseljake@gmail.com> | 2017-09-08 16:07:15 -0600 |
| commit | 15d3eeaf65692e5ad2313c605906eb65f6c8fe3c (patch) | |
| tree | f02d8ea7a648e1b0e6755451b0e9a266cb583952 | |
| parent | 8b9616700421a497c107b35a8f5746fb27a44462 (diff) | |
| download | rust-15d3eeaf65692e5ad2313c605906eb65f6c8fe3c.tar.gz rust-15d3eeaf65692e5ad2313c605906eb65f6c8fe3c.zip | |
Revert "Fix f64 examples"
This reverts commit 576426a05a1a6cb33eece7082d7341b7c6bb5277.
| -rw-r--r-- | src/libstd/f64.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs index 0a7176f9cc7..ab8f2cd2fdf 100644 --- a/src/libstd/f64.rs +++ b/src/libstd/f64.rs @@ -971,17 +971,15 @@ impl f64 { } /// Returns max if self is greater than max, and min if self is less than min. - /// Otherwise this returns self. Panics if min > max, min is NaN, or max is NaN. + /// Otherwise this returns self. Panics if min > max, min equals NaN, or max equals NaN. /// /// # Examples /// /// ``` - /// #![feature(clamp)] - /// use std::f64::NAN; /// 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!((NAN).clamp(-2.0f64, 1.0f64).is_nan()); + /// assert!((NAN).clamp(-2.0f64, 1.0f64) == NAN); /// ``` #[unstable(feature = "clamp", issue = "44095")] #[inline] |
