Joined February 2012
·

Matt Jones

Neo
·
Columbus, OH
·
·

Posted to ~~ is faster than Math.floor() over 1 year ago

Two comments:

  • in some browsers, the test goes the other way: in Safari 5.1, Math.floor is faster.

  • the two are NOT EQUIVALENT for numbers < 0. Math.floor(-3.7) is -4, but ~~(-3.7) is -3.

Achievements
59 Karma
0 Total ProTip Views