use Math.floor instead of ~~ for integer

When testing large numbers, ~~ gives results that are inconsistent with
Math.floor(). The performance impact is *very* small.

http://jsperf.com/tilde-vs-floor
Merge pull request #72 from bengl/mathdotfloor

use Math.floor instead of ~~ for integer