Home Reference VEX VEX functions 

frac vex function

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

Tags: math

Returns the fractional component of the floating point number.

  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)).