Fonction abs() WMLScript
La fonction abs() retourne l'absolu d'un nombre.
Grammaire
n = Lang.abs(x)
Composant | Description |
---|---|
n | Valeur absolue retournée par la fonction. |
x | Calculer l'absolu de ce nombre. |
Exemple
var a = Lang.abs(-5); var b = Lang.abs(-3.4);
Résultat
a = 5 b = 3.4