getAngle method
dynamic
getAngle(
- dynamic p1,
- dynamic p2
- Calculate the angle between two pointers
- @param {PointerEvent} p1
- @param {PointerEvent} p2
- @returns {Number} The angle between two pointers in degrees
- @param {PointerEvent} p1
Implementation
getAngle(p1, p2) {
return Math.atan2(p2.clientY - p1.clientY, p2.clientX - p1.clientX) *
180 /
Math.PI;
}