Coffee Overflooooooooooow!
Mittwoch, 7. November 2012
Rounding Integer in Javascript
There are a few options available when it comes to rounding a positive Integer value down in javascript.
Math.floor()
~~
>> 0
The third option is at least in Firefox a huge performance gain, you may check for yourself, have a look at this
JSPERF
.
Keine Kommentare:
Kommentar veröffentlichen
Älterer Post
Startseite
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen