Browse Source

Fix doc comment

Toshiki Teramura 5 years ago
parent
commit
973ba72e4f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib.rs

+ 2 - 2
src/lib.rs

@@ -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 {