Fix inconsistent documentation
I improved the f32 version and made a copy-paste error for f64.
This commit is contained in:
parent
0e6c3f29be
commit
9a2e7026dc
2 changed files with 5 additions and 4 deletions
|
@ -221,7 +221,7 @@ impl f32 {
|
|||
/// assert!(f32::NAN.copysign(1.0).is_nan());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature="copysign", issue="0")]
|
||||
#[unstable(feature="copysign", issue="55169")]
|
||||
pub fn copysign(self, y: f32) -> f32 {
|
||||
unsafe { intrinsics::copysignf32(self, y) }
|
||||
}
|
||||
|
|
|
@ -177,10 +177,11 @@ impl f64 {
|
|||
}
|
||||
|
||||
/// Returns a number composed of the magnitude of one number and the sign of
|
||||
/// another, or `NAN` if the number is `NAN`.
|
||||
/// another.
|
||||
///
|
||||
/// Equal to `self` if the sign of `self` and `y` are the same, otherwise
|
||||
/// equal to `-y`.
|
||||
/// equal to `-y`. If `self` is a `NAN`, then a `NAN` with the sign of `y`
|
||||
/// is returned.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -198,7 +199,7 @@ impl f64 {
|
|||
/// assert!(f64::NAN.copysign(1.0).is_nan());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature="copysign", issue="0")]
|
||||
#[unstable(feature="copysign", issue="55169")]
|
||||
pub fn copysign(self, y: f64) -> f64 {
|
||||
unsafe { intrinsics::copysignf64(self, y) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue