]> git.lizzy.rs Git - rust.git/commitdiff
Change `copytest` parameter name from `y` to `sign`
authorWill Hakes <info@cwilliamhakes.com>
Sat, 6 Apr 2019 02:30:45 +0000 (20:30 -0600)
committerWill Hakes <info@cwilliamhakes.com>
Sat, 6 Apr 2019 02:30:45 +0000 (20:30 -0600)
src/libstd/f32.rs
src/libstd/f64.rs

index 2952c6aea0023bbb3ba306da6893d87d3d34b13c..133540ed6b9ca8cc74a19daad483866c12b89269 100644 (file)
@@ -193,11 +193,11 @@ pub fn signum(self) -> f32 {
     }
 
     /// Returns a number composed of the magnitude of `self` and the sign of
-    /// `y`.
+    /// `sign`.
     ///
-    /// Equal to `self` if the sign of `self` and `y` are the same, otherwise
+    /// Equal to `self` if the sign of `self` and `sign` are the same, otherwise
     /// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
-    /// `y` is returned.
+    /// `sign` is returned.
     ///
     /// # Examples
     ///
@@ -216,8 +216,8 @@ pub fn signum(self) -> f32 {
     #[inline]
     #[must_use]
     #[stable(feature = "copysign", since = "1.35.0")]
-    pub fn copysign(self, y: f32) -> f32 {
-        unsafe { intrinsics::copysignf32(self, y) }
+    pub fn copysign(self, sign: f32) -> f32 {
+        unsafe { intrinsics::copysignf32(self, sign) }
     }
 
     /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
index 3c3a35573adaa106ac36249dd98a38801d27cb1e..87467aeed8b203bb147397ea2a389f779e338c29 100644 (file)
@@ -171,11 +171,11 @@ pub fn signum(self) -> f64 {
     }
 
     /// Returns a number composed of the magnitude of `self` and the sign of
-    /// `y`.
+    /// `sign`.
     ///
-    /// Equal to `self` if the sign of `self` and `y` are the same, otherwise
+    /// Equal to `self` if the sign of `self` and `sign` are the same, otherwise
     /// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
-    /// `y` is returned.
+    /// `sign` is returned.
     ///
     /// # Examples
     ///
@@ -194,8 +194,8 @@ pub fn signum(self) -> f64 {
     #[inline]
     #[must_use]
     #[stable(feature = "copysign", since = "1.35.0")]
-    pub fn copysign(self, y: f64) -> f64 {
-        unsafe { intrinsics::copysignf64(self, y) }
+    pub fn copysign(self, sign: f64) -> f64 {
+        unsafe { intrinsics::copysignf64(self, sign) }
     }
 
     /// Fused multiply-add. Computes `(self * a) + b` with only one rounding