Trait wasmi_core::Float
source · pub trait Float<T>: ArithmeticOps<T> {
// Required methods
fn abs(self) -> T;
fn floor(self) -> T;
fn ceil(self) -> T;
fn trunc(self) -> T;
fn round(self) -> T;
fn nearest(self) -> T;
fn sqrt(self) -> T;
fn is_sign_positive(self) -> bool;
fn is_sign_negative(self) -> bool;
fn min(self, other: T) -> T;
fn max(self, other: T) -> T;
fn copysign(self, other: T) -> T;
}
Expand description
Float-point value.
Required Methods§
sourcefn round(self) -> T
fn round(self) -> T
Returns the nearest integer to a number. Round half-way cases away from 0.0.
sourcefn is_sign_positive(self) -> bool
fn is_sign_positive(self) -> bool
Returns true
if the sign of the number is positive.
sourcefn is_sign_negative(self) -> bool
fn is_sign_negative(self) -> bool
Returns true
if the sign of the number is negative.