Trait simba::scalar::RealField [−][src]
pub trait RealField: ComplexField<RealField = Self> + RelativeEq<Epsilon = Self> + UlpsEq<Epsilon = Self> + Signed + Bounded + PartialOrd {}Show methods
fn is_sign_positive(self) -> bool; fn is_sign_negative(self) -> bool; fn copysign(self, to: Self) -> Self; fn max(self, other: Self) -> Self; fn min(self, other: Self) -> Self; fn clamp(self, min: Self, max: Self) -> Self; fn atan2(self, other: Self) -> Self; fn pi() -> Self; fn two_pi() -> Self; fn frac_pi_2() -> Self; fn frac_pi_3() -> Self; fn frac_pi_4() -> Self; fn frac_pi_6() -> Self; fn frac_pi_8() -> Self; fn frac_1_pi() -> Self; fn frac_2_pi() -> Self; fn frac_2_sqrt_pi() -> Self; fn e() -> Self; fn log2_e() -> Self; fn log10_e() -> Self; fn ln_2() -> Self; fn ln_10() -> Self;
Expand description
Trait shared by all reals.
Required methods
fn is_sign_positive(self) -> bool
[src]
fn is_sign_positive(self) -> bool
[src]Is the sign of this real number positive?
fn is_sign_negative(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]Is the sign of this real number negative?
fn copysign(self, to: Self) -> Self
[src]
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.
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
fn pi() -> Self
[src]
fn two_pi() -> Self
[src]
fn frac_pi_2() -> Self
[src]
fn frac_pi_3() -> Self
[src]
fn frac_pi_4() -> Self
[src]
fn frac_pi_6() -> Self
[src]
fn frac_pi_8() -> Self
[src]
fn frac_1_pi() -> Self
[src]
fn frac_2_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]
fn e() -> Self
[src]
fn log2_e() -> Self
[src]
fn log10_e() -> Self
[src]
fn ln_2() -> Self
[src]
fn ln_10() -> Self
[src]
Implementations on Foreign Types
impl RealField for f32
[src]
impl RealField for f32
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).
fn is_sign_positive(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]
fn copysign(self, sign: Self) -> Self
[src]
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
impl RealField for f64
[src]
impl RealField for f64
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).
fn is_sign_positive(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]
fn copysign(self, sign: Self) -> Self
[src]
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
Implementors
impl<Fract: Send + Sync + 'static> RealField for FixedI8<Fract> where
Fract: Unsigned + LeEqU8 + IsLessOrEqual<U7, Output = True> + IsLessOrEqual<U6, Output = True> + IsLessOrEqual<U5, Output = True> + IsLessOrEqual<U4, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI8<Fract> where
Fract: Unsigned + LeEqU8 + IsLessOrEqual<U7, Output = True> + IsLessOrEqual<U6, Output = True> + IsLessOrEqual<U5, Output = True> + IsLessOrEqual<U4, Output = True>,
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).
fn is_sign_positive(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]
fn copysign(self, sign: Self) -> Self
[src]
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).
fn is_sign_positive(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]
fn copysign(self, sign: Self) -> Self
[src]
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI32<Fract> where
Fract: Unsigned + LeEqU32 + IsLessOrEqual<U31, Output = True> + IsLessOrEqual<U30, Output = True> + IsLessOrEqual<U29, Output = True> + IsLessOrEqual<U28, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI32<Fract> where
Fract: Unsigned + LeEqU32 + IsLessOrEqual<U31, Output = True> + IsLessOrEqual<U30, Output = True> + IsLessOrEqual<U29, Output = True> + IsLessOrEqual<U28, Output = True>,
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).
fn is_sign_positive(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]
fn copysign(self, sign: Self) -> Self
[src]
fn max(self, other: Self) -> Self
[src]
fn min(self, other: Self) -> Self
[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI64<Fract> where
Fract: Unsigned + LeEqU64 + IsLessOrEqual<U63, Output = True> + IsLessOrEqual<U62, Output = True> + IsLessOrEqual<U61, Output = True> + IsLessOrEqual<U60, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> RealField for FixedI64<Fract> where
Fract: Unsigned + LeEqU64 + IsLessOrEqual<U63, Output = True> + IsLessOrEqual<U62, Output = True> + IsLessOrEqual<U61, Output = True> + IsLessOrEqual<U60, Output = True>,
[src]fn frac_2_sqrt_pi() -> Self
[src]
fn frac_2_sqrt_pi() -> Self
[src]2.0 / sqrt(pi).