The issue here is that when you zoom out, you reduce the scale by a factor of 0.065, but when you zoom in, you increase the scale by the same additive factor, which is not multiplicatively symmetrical -- in order to undo multiplication by 0.935, you need to multiply by 1.0695, not by 1.065.
You can see this erroneous behavior by zooming out one tick, then in one tick, then out one tick, so on and so forth -- it slowly continues to zoom out because the zoom in is slightly too little.
The issue here is that when you zoom out, you reduce the scale by a factor of 0.065, but when you zoom in, you increase the scale by the same additive factor, which is not multiplicatively symmetrical -- in order to undo multiplication by
0.935
, you need to multiply by1.0695
, not by1.065
.You can see this erroneous behavior by zooming out one tick, then in one tick, then out one tick, so on and so forth -- it slowly continues to zoom out because the zoom in is slightly too little.