fract

inline fun fract(v: Float): Float

Returns the fractional part of v.

Return

v - floor(v), in [0, 1) also for negative v (as GLSL's fract)

Parameters

v

the input value