FANDOM


Round

Name Edit

round - returns the rounded value of scalars or vectors

Synopsis Edit

vector1 round(vector1 a);
vector2 round(vector2 a);
vector3 round(vector3 a);
vector4 round(vector4 a);

Parameters Edit

a
Scalar or vector.

Description Edit

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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.