Skip to content

Commit

Permalink
add feature clamp
Browse files Browse the repository at this point in the history
  • Loading branch information
EdorianDark committed Mar 9, 2019
1 parent bd2e126 commit 6041ec3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ impl f32 {
/// # Examples
///
/// ```
/// #![feature(clamp)]
/// 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);
Expand Down
1 change: 1 addition & 0 deletions src/libstd/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ impl f64 {
/// # Examples
///
/// ```
/// #![feature(clamp)]
/// 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);
Expand Down
1 change: 1 addition & 0 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
#![feature(cfg_target_thread_local)]
#![feature(char_error_internals)]
#![feature(checked_duration_since)]
#![feature(clamp)]
#![feature(compiler_builtins_lib)]
#![feature(concat_idents)]
#![feature(const_cstr_unchecked)]
Expand Down

0 comments on commit 6041ec3

Please sign in to comment.