round
La méthode round() arrondit un nombre à l'entier le plus proche. Si la partie décimale est exactement 0.5, le nombre est arrondi vers l'entier supérieur.
Exemple interactif
Syntaxe
typescript
function round<
GenericInput extends number,
>(
input: GenericInput
): numberParamètres
input: Le nombre à arrondir.
Valeur de retour
Le nombre arrondi à l'entier le plus proche.
