fix int roundoff with mouse movement by using floats