(centerX, centerY, radius, angleInDegrees)
| 130 | * }} |
| 131 | */ |
| 132 | export function polarToCartesian(centerX, centerY, radius, angleInDegrees) { |
| 133 | const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0; |
| 134 | |
| 135 | return { |
| 136 | x: centerX + radius * Math.cos(angleInRadians), |
| 137 | y: centerY + radius * Math.sin(angleInRadians), |
| 138 | }; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Sums up the values of the given array and returns the result |
nothing calls this directly
no outgoing calls
no test coverage detected