jdf / peasycam

Dead-simple mouse-driven camera for Processing
http://MrFeinberg.com/peasycam/
Apache License 2.0
116 stars 35 forks source link

Cant zoom when distance hit 0.00 and minimumDistance is set to 0 #15

Closed eskimoblood closed 9 years ago

eskimoblood commented 10 years ago

The following line is used to calculate the distance on zoom:

private void mouseZoom(final double delta) {
    safeSetDistance(distance + delta * Math.log1p(distance));
}

So, when the distance is 0 and the minimumDistance is also 0 or lower you cant zoom out anymore. Also minimumDistance lower then 0 will cause distance to be NaN in some cases.

jdf commented 9 years ago

Pushed in version 201.