(start, end)
| 103 | |
| 104 | // 获取 画线的 角度 |
| 105 | getAngle(start, end) { |
| 106 | var diff_x = end.x - start.x, |
| 107 | diff_y = end.y - start.y; |
| 108 | if (diff_x >= 0) { |
| 109 | return 360 * Math.atan(diff_y / diff_x) / (2 * Math.PI); |
| 110 | } else { |
| 111 | return 180 + 360 * Math.atan(diff_y / diff_x) / (2 * Math.PI); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | // 判断 当前点是否位于 锁内 |
| 116 | isPointInCycle(x, y, circleX, circleY, radius) { |