format
typescript
Mathf.Round(val)class: Mathf
description
Returns the value of the specified number rounded to the nearest integer.
parameter
| param_name | type | description |
|---|---|---|
| val | number | The specified number. |
return
| type | description |
|---|---|
number | The 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