math.abs
Restituisce un numero senza il segno meno.
Firma
math.abs(x: number): number
Parametri
| Nome | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
x | number | Obbligatorio | Il numero su cui lavorare. |
Restituisce
number Il numero risultante.
Esempio
const gap: number = math.abs(down - up);
