Trait wasmi_core::Float

source ·
pub trait Float<T>: ArithmeticOps<T> {
    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§

Get absolute value.

Returns the largest integer less than or equal to a number.

Returns the smallest integer greater than or equal to a number.

Returns the integer part of a number.

Returns the nearest integer to a number. Round half-way cases away from 0.0.

Returns the nearest integer to a number. Ties are round to even number.

Takes the square root of a number.

Returns true if the sign of the number is positive.

Returns true if the sign of the number is negative.

Returns the minimum of the two numbers.

Returns the maximum of the two numbers.

Sets sign of this value to the sign of other value.

Implementations on Foreign Types§

Implementors§