Function glm::builtin::floor [] [src]

pub fn floor<F: BaseFloat, T: GenFloat<F>>(x: T) -> T

Returns a value equal to the nearest integer that is less than or equal to x.

Example

assert_eq!(glm::floor(-3.14_f32), -4.);
assert_eq!(glm::floor(glm::vec3(-1.7, 4., 4.9)), glm::vec3(-2., 4., 4.));