Replace Math.floor with << 0 for speed.