Function glm::builtin::fract
[−]
[src]
pub fn fract<F: BaseFloat, T: GenFloat<F>>(x: T) -> T
Returns x – floor(x)
.
Example
use glm::{ fract, vec2 }; assert_eq!(fract(3.25_f32), 0.25); assert_eq!(fract(vec2(-1.5, 1.)), vec2(-0.5, 0.));