calculatePointersDistance method
- Calculate the distance between two pointers
p0The first pointerp1The second pointer- returns double The distance between the two pointers
Implementation
double calculatePointersDistance(p0, p1) {
return math.sqrt(math.pow(p1.clientX - p0.clientX, 2) +
math.pow(p1.clientY - p0.clientY, 2));
}