frac VEX function

Returns the fractional component of the floating point number.

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. float frac(float )

  2. vector frac(vector )

  3. vector4 frac(vector4 )

Returns the fractional component of the floating point number. This is equivalent to (x - floor(x)).