mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-06 23:17:37 +00:00
Stablize {f32,f64}::copysign().
This commit is contained in:
parent
237bf3244f
commit
d9bdd01ac0
@ -202,7 +202,6 @@ impl f32 {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(copysign)]
|
|
||||||
/// use std::f32;
|
/// use std::f32;
|
||||||
///
|
///
|
||||||
/// let f = 3.5_f32;
|
/// let f = 3.5_f32;
|
||||||
@ -216,7 +215,7 @@ impl f32 {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[unstable(feature="copysign", issue="55169")]
|
#[stable(feature = "copysign", since = "1.35.0")]
|
||||||
pub fn copysign(self, y: f32) -> f32 {
|
pub fn copysign(self, y: f32) -> f32 {
|
||||||
unsafe { intrinsics::copysignf32(self, y) }
|
unsafe { intrinsics::copysignf32(self, y) }
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,6 @@ impl f64 {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(copysign)]
|
|
||||||
/// use std::f64;
|
/// use std::f64;
|
||||||
///
|
///
|
||||||
/// let f = 3.5_f64;
|
/// let f = 3.5_f64;
|
||||||
@ -194,7 +193,7 @@ impl f64 {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[unstable(feature="copysign", issue="55169")]
|
#[stable(feature = "copysign", since = "1.35.0")]
|
||||||
pub fn copysign(self, y: f64) -> f64 {
|
pub fn copysign(self, y: f64) -> f64 {
|
||||||
unsafe { intrinsics::copysignf64(self, y) }
|
unsafe { intrinsics::copysignf64(self, y) }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user