Function glm::builtin::trunc
[−]
[src]
pub fn trunc<F: BaseFloat, T: GenFloat<F>>(x: T) -> T
Returns a value equal to the nearest integer to x
whose absolute value
is not larger than the absolute value of x
.
Example
assert_eq!(glm::trunc(-3.14_f32), -3.); assert_eq!(glm::trunc(glm::vec3(-1.7, 4., 4.9)), glm::vec3(-1., 4., 4.));