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
0when the input is NaN.int::MINwhen the input is -INF.int::MAXwhen 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.