getAngle method
Calculate the angle between two pointers returns double The angle between two pointers in degrees
Implementation
double getAngle(p1, p2) {
return math.atan2(p2.clientY - p1.clientY, p2.clientX - p1.clientX) *180 /math.pi;
}
Calculate the angle between two pointers returns double The angle between two pointers in degrees
double getAngle(p1, p2) {
return math.atan2(p2.clientY - p1.clientY, p2.clientX - p1.clientX) *180 /math.pi;
}