# scale = 1
# will make scale = 1.1
scale = 1 * (1 + 100 * 0.001)
# zoom in will make scale = 0.99
scale = 1.1 * (1 + -100 * 0.001)
Value drifts on zoom out, zoom in.
Lets look at scaling formula: new_scale = old_scale * scale_factor
In order to reverse zoom action you need to get old_scale, which we can derive like:
old_scale = new_scale * 1/scale_factor
So scale factors should be scale_factor and 1/scale_factor
For scaling there is formula, which is incorrect:
Lets zoom out and zoom in:
Value drifts on zoom out, zoom in.
Lets look at scaling formula:
new_scale = old_scale * scale_factor
In order to reverse zoom action you need to getold_scale
, which we can derive like:old_scale = new_scale * 1/scale_factor
So scale factors should be
scale_factor
and1/scale_factor