Math.round()

Get the value of a number rounded to the nearest integer.

Signature

Math.round(x: Number): Number

Description

Gets the value of a number rounded to the nearest integer.

Parameters

Parameter Type Required Description

x

Number

Yes

A number.

Return value

Type Description

Number

Value of x rounded to the nearest integer.

Examples

Math.round(19.51555, 2)
19.52

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!