pub trait SIMDFloat {
// Required method
fn round(self) -> Self;
}
Expand description
Commont floating-point functions.
Required Methods§
sourcefn round(self) -> Self
fn round(self) -> Self
Rounds values of the vector to the nearest integers. In case of two integers are equally
close (i.e. fractional part of a number equals 0.5
) the behavior depends on platform.
§Exmaples
let vec = Vec4f::new(1.3, -3.7, 0.7, -0.3);
assert_eq!(vec.round(), Vec4f::new(1.0, -4.0, 1.0, 0.0));
Object Safety§
This trait is not object safe.