Formula for moving object 1px when scaled down to 0.4824074074074074

35 Views Asked by At

This question comes within the context of web development but it is definitely a mathematical question IMO. As I drag my object around on the (x,y) axis. I am getting the coordinates returned to me in 1px increments i.e 1,2,3,4,5.

The problem is my view is scaled down. In this case, it's scaled down to 0.4824074074074074. The math below causes the dragging item to go across the plane in 2px increments.

(5 / 0.4824074074074074) = 10.3646833013

(6 / 0.4824074074074074) = 12.4376199616

Is there a formula where I can factor in the scale, then with 5 to 6 as an example, get 10 to 11 in the scaled plane?