math.floor
Arrotonda un numero per difetto.
Firma
math.floor(x: number): number
Parametri
| Nome | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
x | number | Obbligatorio | Il numero su cui lavorare. |
Restituisce
number Il numero risultante.
Esempio
const down: number = math.floor(hp / 3);
