Get Math.floor() out of resampling hot path

|0 does the same thing but doesn't add up on the profiler in IE