Fix doc comment

This commit is contained in:
Toshiki Teramura 2019-08-31 15:34:40 +09:00
parent e7ba9b62dc
commit 973ba72e4f
1 changed files with 2 additions and 2 deletions

View File

@ -375,7 +375,7 @@ pub fn clamp<T: PartialOrd>(input: T, min: T, max: T) -> T {
///
/// If input is less than min then this returns min.
/// Otherwise this returns input.
/// Preserves `NaN` different from `min`.
/// `clamp_min(std::f32::NAN, 1.0)` preserves `NAN` different from `f32::min(std::f32::NAN, 1.0)`.
#[inline]
pub fn clamp_min<T: PartialOrd>(input: T, min: T) -> T {
if input < min {
@ -389,7 +389,7 @@ pub fn clamp_min<T: PartialOrd>(input: T, min: T) -> T {
///
/// If input is less than min then this returns min.
/// Otherwise this returns input.
/// Preserves `NaN` different from `max`.
/// `clamp_max(std::f32::NAN, 1.0)` preserves `NAN` different from `f32::max(std::f32::NAN, 1.0)`.
#[inline]
pub fn clamp_max<T: PartialOrd>(input: T, max: T) -> T {
if input > max {