Skip to content

Commit eafdad5

Browse files
committed
Revert "Fix f32 examples."
This reverts commit 61f20f8.
1 parent 15d3eea commit eafdad5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/libstd/f32.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1081,17 +1081,15 @@ impl f32 {
10811081
}
10821082

10831083
/// Returns max if self is greater than max, and min if self is less than min.
1084-
/// Otherwise this returns self. Panics if min > max, min is NaN, or max is NaN.
1084+
/// Otherwise this returns self. Panics if min > max, min equals NaN, or max equals NaN.
10851085
///
10861086
/// # Examples
10871087
///
10881088
/// ```
1089-
/// #![feature(clamp)]
1090-
/// use std::f32::NAN;
10911089
/// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
10921090
/// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
10931091
/// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);
1094-
/// assert!((NAN).clamp(-2.0f32, 1.0f32).is_nan());
1092+
/// assert!((NAN).clamp(-2.0f32, 1.0f32) == NAN);
10951093
/// ```
10961094
#[unstable(feature = "clamp", issue = "44095")]
10971095
#[inline]

0 commit comments

Comments
 (0)