Trait rin::math::scalar::RealField [−][src]
pub trait RealField: ComplexField<RealField = Self> + RelativeEq<Self, Epsilon = Self, Epsilon = Self> + UlpsEq<Self> + Signed + Bounded + PartialOrd<Self> {}Show methods
pub fn is_sign_positive(self) -> bool; pub fn is_sign_negative(self) -> bool; pub fn copysign(self, to: Self) -> Self; pub fn max(self, other: Self) -> Self; pub fn min(self, other: Self) -> Self; pub fn clamp(self, min: Self, max: Self) -> Self; pub fn atan2(self, other: Self) -> Self; pub fn pi() -> Self; pub fn two_pi() -> Self; pub fn frac_pi_2() -> Self; pub fn frac_pi_3() -> Self; pub fn frac_pi_4() -> Self; pub fn frac_pi_6() -> Self; pub fn frac_pi_8() -> Self; pub fn frac_1_pi() -> Self; pub fn frac_2_pi() -> Self; pub fn frac_2_sqrt_pi() -> Self; pub fn e() -> Self; pub fn log2_e() -> Self; pub fn log10_e() -> Self; pub fn ln_2() -> Self; pub fn ln_10() -> Self;
Trait shared by all reals.
Required methods
pub fn is_sign_positive(self) -> bool
[src]
Is the sign of this real number positive?
pub fn is_sign_negative(self) -> bool
[src]
Is the sign of this real number negative?
pub fn copysign(self, to: Self) -> Self
[src]
Copies the sign of self
to to
.
- Returns
to.simd_abs()
ifself
is positive or positive-zero. - Returns
-to.simd_abs()
ifself
is negative or negative-zero.
pub fn max(self, other: Self) -> Self
[src]
pub fn min(self, other: Self) -> Self
[src]
pub fn clamp(self, min: Self, max: Self) -> Self
[src]
pub fn atan2(self, other: Self) -> Self
[src]
pub fn pi() -> Self
[src]
pub fn two_pi() -> Self
[src]
pub fn frac_pi_2() -> Self
[src]
pub fn frac_pi_3() -> Self
[src]
pub fn frac_pi_4() -> Self
[src]
pub fn frac_pi_6() -> Self
[src]
pub fn frac_pi_8() -> Self
[src]
pub fn frac_1_pi() -> Self
[src]
pub fn frac_2_pi() -> Self
[src]
pub fn frac_2_sqrt_pi() -> Self
[src]
pub fn e() -> Self
[src]
pub fn log2_e() -> Self
[src]
pub fn log10_e() -> Self
[src]
pub fn ln_2() -> Self
[src]
pub fn ln_10() -> Self
[src]
Implementations on Foreign Types
impl RealField for f32
[src]
impl RealField for f32
[src]pub fn is_sign_positive(self) -> bool
[src]
pub fn is_sign_negative(self) -> bool
[src]
pub fn copysign(self, sign: f32) -> f32
[src]
pub fn max(self, other: f32) -> f32
[src]
pub fn min(self, other: f32) -> f32
[src]
pub fn clamp(self, min: f32, max: f32) -> f32
[src]
pub fn atan2(self, other: f32) -> f32
[src]
pub fn pi() -> f32
[src]
Archimedes’ constant.
pub fn two_pi() -> f32
[src]
2.0 * pi.
pub fn frac_pi_2() -> f32
[src]
pi / 2.0.
pub fn frac_pi_3() -> f32
[src]
pi / 3.0.
pub fn frac_pi_4() -> f32
[src]
pi / 4.0.
pub fn frac_pi_6() -> f32
[src]
pi / 6.0.
pub fn frac_pi_8() -> f32
[src]
pi / 8.0.
pub fn frac_1_pi() -> f32
[src]
1.0 / pi.
pub fn frac_2_pi() -> f32
[src]
2.0 / pi.
pub fn frac_2_sqrt_pi() -> f32
[src]
2.0 / sqrt(pi).
pub fn e() -> f32
[src]
Euler’s number.
pub fn log2_e() -> f32
[src]
log2(e).
pub fn log10_e() -> f32
[src]
log10(e).
pub fn ln_2() -> f32
[src]
ln(2.0).
pub fn ln_10() -> f32
[src]
ln(10.0).
impl RealField for f64
[src]
impl RealField for f64
[src]pub fn is_sign_positive(self) -> bool
[src]
pub fn is_sign_negative(self) -> bool
[src]
pub fn copysign(self, sign: f64) -> f64
[src]
pub fn max(self, other: f64) -> f64
[src]
pub fn min(self, other: f64) -> f64
[src]
pub fn clamp(self, min: f64, max: f64) -> f64
[src]
pub fn atan2(self, other: f64) -> f64
[src]
pub fn pi() -> f64
[src]
Archimedes’ constant.
pub fn two_pi() -> f64
[src]
2.0 * pi.
pub fn frac_pi_2() -> f64
[src]
pi / 2.0.
pub fn frac_pi_3() -> f64
[src]
pi / 3.0.
pub fn frac_pi_4() -> f64
[src]
pi / 4.0.
pub fn frac_pi_6() -> f64
[src]
pi / 6.0.
pub fn frac_pi_8() -> f64
[src]
pi / 8.0.
pub fn frac_1_pi() -> f64
[src]
1.0 / pi.
pub fn frac_2_pi() -> f64
[src]
2.0 / pi.
pub fn frac_2_sqrt_pi() -> f64
[src]
2.0 / sqrt(pi).
pub fn e() -> f64
[src]
Euler’s number.
pub fn log2_e() -> f64
[src]
log2(e).
pub fn log10_e() -> f64
[src]
log10(e).
pub fn ln_2() -> f64
[src]
ln(2.0).
pub fn ln_10() -> f64
[src]
ln(10.0).