Name
Math.round() — Rundet auf die nächste ganze Zahlorm:availability:
Überblick
Math.round(x
)
Argumente
x
Eine beliebige Zahl.
Rückgabewert
Die nächstgelegene ganze Zahl.
Beschreibung
Die Methode Math.round()
rundet ihr Argument auf die nächstgelegene ganze Zahl auf oder ab. Der Wert .5 wird aufgerundet. So wird z.B. 2.5 auf 3 und -2.5 auf -2 gerundet.
Get JavaScript: Das umfassende Referenzwerk, Sixth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.