Function: Round
Function: Round

Function: Round

Round ( NUMBER )

Returns a value rounded to the nearest whole number.

Parameters

Parameter Type Description
NUMBER VALUE(FLOAT) The input value.

Returns

VALUE(FLOAT) The input value, rounded to the nearest.

What It Does

This function takes a numeric value and rounds it to the nearest whole number (banker's rounding). The input value is interpreted as a floating-point number.


	a = round(1.25);     // a = 1.0
	a = round(1.875);    // a = 2.0
	a = round(1.0);      // a = 1.0
	a = round(-1.25);    // a = -1.0
	a = round("1.25");   // a = 1.0
×

Modal Header