Light | Dark

fract

Name

fract — compute the fractional part of the argument

Declaration

genType fract( genType x);
genDType fract( genDType x);

Parameters

x

Specify the value to evaluate.

Description

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

Version Support

OpenGL Shading Language Version
Function Name 1.10 1.20 1.30 1.40 1.50 3.30 4.00 4.10 4.20 4.30 4.40 4.50
fract (genType)
fract (genDType) - - - - - -

See Also

floor, round

Think you can improve this page? Edit this page on GitHub.