the sliding distance of the mobile phone needs to be calculated in the
project.
the usual way to calculate the distance is to use the coordinates of touchend minus the coordinates of touchstart and then calculate.
suppose that the finger moves from point A to point B and then back to point A, the coordinates of touchend coincide with that of touchstart, and the actual sliding distance of the finger is twice the length of AB. At this time, how to calculate the distance of finger sliding?