thebookofshaders/glossary/fract.md
Patricio Gonzalez Vivo 2c96f43dcf adding more functions
2015-04-17 14:16:45 -04:00

513 B

Fract

Compute the fractional part of the argument

float fract(float x)  
vec2 fract(vec2 x)  
vec3 fract(vec3 x)  
vec4 fract(vec4 x)

Parameters

x Specify the value to evaluate.

Description

fract() returns the fractional part of x. This is calculated as x - floor(x).

See Also

floor, ceil, mod, Chapter 05: Shaping Functions