Skip to content

format

typescript
Mathf.Round(val)

class: Mathf

description

Returns the value of the specified number rounded to the nearest integer.

parameter

param_nametypedescription
valnumberThe specified number.

return

typedescription
numberThe value of the specified number rounded to the nearest integer.

code example

typescript
//Rounds the specified number to the nearest integer
let round = Mathf.Round(3.2) //round=3