Built-in functions: math_round()

The function math_round() rounds a value to the next lowest or highest integer value.

Declaration

float math_round( float aValue )

Parameters

aValue

The value to round.

Discussion

The function math_round() calculates the next lowest or highest integer value of the value passed in the parameter aValue. For example:

var float result = math_round( 11.3 ); // result = 11.0 var float result = math_round( -5.3 ); // result = -5.0