I am in a middle of a grid of 8X8 . Each box of grid is a square with side of 80 units. Suppose my current coordinates are 594,422 . How many boxes will i have to move to enter the square that contains the coordinates 594,24 ?
The grid starts from the coordinates 350,20
as shown here.
The answer of the above problem is : I will have to move 5 boxes to capture the coordinate 594,24
. But how can i generalize this result ? Any expression that can evaluate this is what i want ? Please also show the logic i.e where does the expression come from .
If my current coordinate is x,y and i have to capture x,q how many boxes will i have to move to do that ? Getting more general , if my current coordinate is x,y and i have to capture p,q how many boxes will i have to move to do that ?
In this grid x and y increase as shown.