add feature clamp

This commit is contained in:
Dirk Leifeld 2019-03-09 20:10:48 +01:00
parent bd2e12609f
commit 6041ec3b78
3 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)]