add feature clamp
This commit is contained in:
parent
bd2e12609f
commit
6041ec3b78
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user