compute value of one parameter modulo another
float mod(float x, float y)
vec2 mod(vec2 x, vec2 y)
vec3 mod(vec3 x, vec3 y)
vec4 mod(vec4 x, vec4 y)
vec2 mod(vec2 x, float y)
vec3 mod(vec3 x, float y)
vec4 mod(vec4 x, float y)
x
: Specify the value to evaluate.y
: Specify the value by which to perform the modulo.mod
returns the value of x
modulo y
. This is computed as x
- y
* floor(x
/y
).