Trait Float
Source pub trait Float: Number {
Show 14 methods
// Required methods
fn is_inf(self) -> bool;
fn is_nan(self) -> bool;
fn exp(self) -> Self;
fn ln(self) -> Self;
fn log(self, base: Self) -> Self;
fn sin(self) -> Self;
fn asin(self) -> Self;
fn sinh(self) -> Self;
fn cos(self) -> Self;
fn acos(self) -> Self;
fn cosh(self) -> Self;
fn tan(self) -> Self;
fn atan(self) -> Self;
fn tanh(self) -> Self;
}
Expand description
Return true if this Float is infinite (positive or negative infinity).
Return true if this Float is not a number (e.g. a float representation of 1.0 / 0.0).
Exponentiate this number (equivalent to consts::E.pow(self)).
Return the natural logarithm of this Float.
Calculate the logarithm of this Float w/r/t the given base.
Return the sine of this Float (in radians).
Return the arcsine of this Float (in radians).
Return the hyperbolic sine of this Float (in radians).
Return the cosine of this Float (in radians).
Return the arcsine of this Float (in radians).
Return the hyperbolic cosine of this Float (in radians).
Return the tangent of this Float (in radians).
Return the arctangent of this Float (in radians).
Return the hyperbolic tangent of this Float (in radians).
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.