polarToCartesian(
radius,angle):SvgPoint
Defined in: utils.ts:265
Converts a polar coordinate into an SVG-space cartesian point.
Angles are in degrees. 0 points right, and positive values rotate clockwise in SVG coordinates.
Parameters
| Parameter | Type | Description |
|---|---|---|
radius | number | Distance from the origin. |
angle | number | Angle in degrees. |
Returns
The cartesian point.
Example
ts
polarToCartesian(10, 90) // { x: 0, y: 10 }