Trait simba::scalar::RealField

source ·
pub trait RealField:
    ComplexField<RealField = Self>
    + RelativeEq<Epsilon = Self>
    + UlpsEq<Epsilon = Self>
    + Signed
    + PartialOrd {
Show 24 methods // Required methods fn is_sign_positive(&self) -> bool; fn is_sign_negative(&self) -> bool; fn copysign(self, sign: 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 min_value() -> Option<Self>; fn max_value() -> Option<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§

source

fn is_sign_positive(&self) -> bool

Is the sign of this real number positive?

source

fn is_sign_negative(&self) -> bool

Is the sign of this real number negative?

source

fn copysign(self, sign: Self) -> Self

Copies the sign of sign to self.

  • Returns self.simd_abs() if sign is positive or positive-zero.
  • Returns -self.simd_abs() if sign is negative or negative-zero.
source

fn max(self, other: Self) -> Self

source

fn min(self, other: Self) -> Self

source

fn clamp(self, min: Self, max: Self) -> Self

source

fn atan2(self, other: Self) -> Self

source

fn min_value() -> Option<Self>

The smallest finite positive value representable using this type.

source

fn max_value() -> Option<Self>

The largest finite positive value representable using this type.

source

fn pi() -> Self

source

fn two_pi() -> Self

source

fn frac_pi_2() -> Self

source

fn frac_pi_3() -> Self

source

fn frac_pi_4() -> Self

source

fn frac_pi_6() -> Self

source

fn frac_pi_8() -> Self

source

fn frac_1_pi() -> Self

source

fn frac_2_pi() -> Self

source

fn frac_2_sqrt_pi() -> Self

source

fn e() -> Self

source

fn log2_e() -> Self

source

fn log10_e() -> Self

source

fn ln_2() -> Self

source

fn ln_10() -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl RealField for f32

source§

fn min_value() -> Option<Self>

The smallest finite positive value representable using this type.

source§

fn max_value() -> Option<Self>

The largest finite positive value representable using this type.

source§

fn pi() -> Self

Archimedes’ constant.

source§

fn two_pi() -> Self

2.0 * pi.

source§

fn frac_pi_2() -> Self

pi / 2.0.

source§

fn frac_pi_3() -> Self

pi / 3.0.

source§

fn frac_pi_4() -> Self

pi / 4.0.

source§

fn frac_pi_6() -> Self

pi / 6.0.

source§

fn frac_pi_8() -> Self

pi / 8.0.

source§

fn frac_1_pi() -> Self

1.0 / pi.

source§

fn frac_2_pi() -> Self

2.0 / pi.

source§

fn frac_2_sqrt_pi() -> Self

2.0 / sqrt(pi).

source§

fn e() -> Self

Euler’s number.

source§

fn log2_e() -> Self

log2(e).

source§

fn log10_e() -> Self

log10(e).

source§

fn ln_2() -> Self

ln(2.0).

source§

fn ln_10() -> Self

ln(10.0).

source§

fn is_sign_positive(&self) -> bool

source§

fn is_sign_negative(&self) -> bool

source§

fn copysign(self, sign: Self) -> Self

source§

fn max(self, other: Self) -> Self

source§

fn min(self, other: Self) -> Self

source§

fn clamp(self, min: Self, max: Self) -> Self

source§

fn atan2(self, other: Self) -> Self

source§

impl RealField for f64

source§

fn min_value() -> Option<Self>

The smallest finite positive value representable using this type.

source§

fn max_value() -> Option<Self>

The largest finite positive value representable using this type.

source§

fn pi() -> Self

Archimedes’ constant.

source§

fn two_pi() -> Self

2.0 * pi.

source§

fn frac_pi_2() -> Self

pi / 2.0.

source§

fn frac_pi_3() -> Self

pi / 3.0.

source§

fn frac_pi_4() -> Self

pi / 4.0.

source§

fn frac_pi_6() -> Self

pi / 6.0.

source§

fn frac_pi_8() -> Self

pi / 8.0.

source§

fn frac_1_pi() -> Self

1.0 / pi.

source§

fn frac_2_pi() -> Self

2.0 / pi.

source§

fn frac_2_sqrt_pi() -> Self

2.0 / sqrt(pi).

source§

fn e() -> Self

Euler’s number.

source§

fn log2_e() -> Self

log2(e).

source§

fn log10_e() -> Self

log10(e).

source§

fn ln_2() -> Self

ln(2.0).

source§

fn ln_10() -> Self

ln(10.0).

source§

fn is_sign_positive(&self) -> bool

source§

fn is_sign_negative(&self) -> bool

source§

fn copysign(self, sign: Self) -> Self

source§

fn max(self, other: Self) -> Self

source§

fn min(self, other: Self) -> Self

source§

fn clamp(self, min: Self, max: Self) -> Self

source§

fn atan2(self, other: Self) -> Self

Implementors§