( a, b )
| 65 | } |
| 66 | |
| 67 | static calcDistanceBetweenTwoPoints( a, b ){ |
| 68 | const dx = a.x - b.x; |
| 69 | const dy = a.y - b.y; |
| 70 | return Math.sqrt( dx*dx + dy*dy ); |
| 71 | } |
| 72 | |
| 73 | static calcPointOnCircle( cx, cy, radius, theta ){ |
| 74 | const x = Math.cos( theta ) * radius + cx; |