replace floor hack with Math.floor()

Rounding a value - 0.5 is a common hack to work around the lack of a
floor function. Since Math.floor() exists, we will use it instead.
Merge pull request #22 from anthonyryan1/master

replace floor hack with Math.floor()