round - returns the rounded value of scalars or vectors
vector1 round(vector1 a); vector2 round(vector2 a); vector3 round(vector3 a); vector4 round(vector4 a);
- Scalar or vector.
Returns the rounded value of a scalar or vector.
For vectors, the returned vector contains the rounded value of each element of the input vector.
The round operation returns the nearest integer to the operand. The value returned by round() if the fractional portion of the operand is 0.5 is profile dependent. On older profiles without built-in round() support, round-to-nearest up rounding is used. On profiles newer than fp40/vp40, round-to-nearest even is used.