pub trait FloatExt<T: Float>{
Show 57 methods
// Required methods
fn nan() -> Self;
fn infinity() -> Self;
fn neg_infinity() -> Self;
fn neg_zero() -> Self;
fn min_value() -> Self;
fn min_positive_value() -> Self;
fn max_value() -> Self;
fn is_nan(self) -> bool;
fn is_infinite(self) -> bool;
fn is_finite(self) -> bool;
fn is_normal(self) -> bool;
fn classify(self) -> FpCategory;
fn floor(self) -> Self;
fn ceil(self) -> Self;
fn round(self) -> Self;
fn trunc(self) -> Self;
fn fract(self) -> Self;
fn abs(self) -> Self;
fn signum(self) -> Self;
fn is_sign_positive(self) -> bool;
fn is_sign_negative(self) -> bool;
fn mul_add(self, _: Self, _: Self) -> Self;
fn recip(self) -> Self;
fn powi(self, _: i32) -> Self;
fn powf(self, _: Self) -> Self;
fn sqrt(self) -> Self;
fn exp(self) -> Self;
fn exp2(self) -> Self;
fn ln(self) -> Self;
fn log(self, _: Self) -> Self;
fn log2(self) -> Self;
fn log10(self) -> Self;
fn max(self, _: Self) -> Self;
fn min(self, _: Self) -> Self;
fn abs_sub(self, _: Self) -> Self;
fn cbrt(self) -> Self;
fn hypot(self, _: Self) -> Self;
fn sin(self) -> Self;
fn cos(self) -> Self;
fn tan(self) -> Self;
fn asin(self) -> Self;
fn acos(self) -> Self;
fn atan(self) -> Self;
fn atan2(self, _: Self) -> Self;
fn sin_cos(self) -> (Self, Self);
fn exp_m1(self) -> Self;
fn ln_1p(self) -> Self;
fn sinh(self) -> Self;
fn cosh(self) -> Self;
fn tanh(self) -> Self;
fn asinh(self) -> Self;
fn acosh(self) -> Self;
fn atanh(self) -> Self;
fn integer_decode(self) -> (u64, i16, i8);
fn epsilon() -> Self;
fn to_degrees(self) -> Self;
fn to_radians(self) -> Self;
}
Expand description
Similar to num_traits::Float
, but without requiring NumCast
and ToPrimitive
.
Required Methods§
fn nan() -> Self
fn infinity() -> Self
fn neg_infinity() -> Self
fn neg_zero() -> Self
fn min_value() -> Self
fn min_positive_value() -> Self
fn max_value() -> Self
fn is_nan(self) -> bool
fn is_infinite(self) -> bool
fn is_finite(self) -> bool
fn is_normal(self) -> bool
fn classify(self) -> FpCategory
fn floor(self) -> Self
fn ceil(self) -> Self
fn round(self) -> Self
fn trunc(self) -> Self
fn fract(self) -> Self
fn abs(self) -> Self
fn signum(self) -> Self
fn is_sign_positive(self) -> bool
fn is_sign_negative(self) -> bool
fn mul_add(self, _: Self, _: Self) -> Self
fn recip(self) -> Self
fn powi(self, _: i32) -> Self
fn powf(self, _: Self) -> Self
fn sqrt(self) -> Self
fn exp(self) -> Self
fn exp2(self) -> Self
fn ln(self) -> Self
fn log(self, _: Self) -> Self
fn log2(self) -> Self
fn log10(self) -> Self
fn max(self, _: Self) -> Self
fn min(self, _: Self) -> Self
fn abs_sub(self, _: Self) -> Self
fn cbrt(self) -> Self
fn hypot(self, _: Self) -> Self
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
fn asin(self) -> Self
fn acos(self) -> Self
fn atan(self) -> Self
fn atan2(self, _: Self) -> Self
fn sin_cos(self) -> (Self, Self)
fn exp_m1(self) -> Self
fn ln_1p(self) -> Self
fn sinh(self) -> Self
fn cosh(self) -> Self
fn tanh(self) -> Self
fn asinh(self) -> Self
fn acosh(self) -> Self
fn atanh(self) -> Self
fn integer_decode(self) -> (u64, i16, i8)
fn epsilon() -> Self
fn to_degrees(self) -> Self
fn to_radians(self) -> Self
Object Safety§
This trait is not object safe.