it basically works out how far the object has travelled.Say an object moves left 3 and up 4, it would work out the distance from before it was moved.
pythagoris therom(spelling is rubbish)
the distance between s and e = (4*4)+(3*3)
pythagoris therom(spelling is rubbish)
...... ..E... ..^... ..^... ..<<<<S
the distance between s and e = (4*4)+(3*3)