How does touchmove calculate the distance of movement instead of displacement?

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?

Mar.16,2021

every time you execute touchmove, calculate the distance between this time and the last time you executed touchmove or touchstart. Add up these distances, and it seems that you can only do so

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e6eb-2b777.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e6eb-2b777.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?