Trait wasmi_core::TruncateSaturateInto
source · pub trait TruncateSaturateInto<T> {
// Required method
fn truncate_saturate_into(self) -> T;
}
Expand description
Convert one type to another by rounding to the nearest integer towards zero.
Note
This has saturating semantics for when the integer cannot represent the float.
Returns
0
when the input is NaN.int::MIN
when the input is -INF.int::MAX
when the input is +INF.
Required Methods§
sourcefn truncate_saturate_into(self) -> T
fn truncate_saturate_into(self) -> T
Convert one type to another by rounding to the nearest integer towards zero.