math.round
Rounds a number to the nearest whole number.
Signature
math.round(x: number): number
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x | number | Required | The number to work on. |
Returns
number The resulting number.
Example
const near: number = math.round(hp / 3);
