Last active 3 months ago
0
0
1
| 1 | // Get angle on circle from mouse position |
| 2 | function getAngleOnCircleFromOffsetMouse(evt) { |
| 3 | const x = (evt.pageX - element.offset().left); |
| 4 | const y = (evt.pageY - element.offset().top); |
| 5 | |
| 6 | // https://math.stackexchange.com/a/127615 |
| 7 | const center = { x: width / 2, y: width / 2 }; |
| 8 | const xCenter = (x - center.x); |
| 9 | const yCenter = (y - center.y); |
| 10 | const circlePoint = { |