js:Math.ceil

Un article de Polydoc.

Sommaire

[modifier] Synopsis

integer Math.ceil(float <<nombre>>)

[modifier] Description

La méthode ceil de l'objet Math retourne l'entier supérieur ou égal le plus proche du nombre <<nombre>>.

[modifier] Exemples

var x = Math.ceil(5.32);      // x vaut 6
x = Math.ceil(15);            // x vaut 15
x = Math.ceil(-3.26);         // x vaut -3
x = Math.ceil(-27);           // x vaut -27
x = Math.ceil(0);             // x vaut 0

[modifier] Voir aussi

[modifier] Liens internes