Skip to content

Commit 6041ec3

Browse files
committed
add feature clamp
1 parent bd2e126 commit 6041ec3

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/libstd/f32.rs

+1
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ impl f32 {
962962
/// # Examples
963963
///
964964
/// ```
965+
/// #![feature(clamp)]
965966
/// assert!((-3.0f32).clamp(-2.0f32, 1.0f32) == -2.0f32);
966967
/// assert!((0.0f32).clamp(-2.0f32, 1.0f32) == 0.0f32);
967968
/// assert!((2.0f32).clamp(-2.0f32, 1.0f32) == 1.0f32);

src/libstd/f64.rs

+1
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ impl f64 {
884884
/// # Examples
885885
///
886886
/// ```
887+
/// #![feature(clamp)]
887888
/// assert!((-3.0f64).clamp(-2.0f64, 1.0f64) == -2.0f64);
888889
/// assert!((0.0f64).clamp(-2.0f64, 1.0f64) == 0.0f64);
889890
/// assert!((2.0f64).clamp(-2.0f64, 1.0f64) == 1.0f64);

src/libstd/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
#![feature(cfg_target_thread_local)]
241241
#![feature(char_error_internals)]
242242
#![feature(checked_duration_since)]
243+
#![feature(clamp)]
243244
#![feature(compiler_builtins_lib)]
244245
#![feature(concat_idents)]
245246
#![feature(const_cstr_unchecked)]

0 commit comments

Comments
 (0)