API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classPolarVector
@codexo/exojs / math / stable
A 2D vector expressed in polar coordinates: `radius` (magnitude) and `phi` (angle in radians, measured from the positive X-axis).
2
props
2
methods
0
events
Import
import { PolarVector } from '@codexo/exojs'A 2D vector expressed in polar coordinates: `radius` (magnitude) and `phi` (angle in radians, measured from the positive X-axis).
Constructors1
new(radius: number, angle: number): PolarVectorMethods2
Convert to a Cartesian Vector. Returns Vector.temp - do not store the reference across calls.
Create a PolarVector from a Cartesian vector, preserving both magnitude and direction. The roundtrip PolarVector.fromVector(v).toVector() reproduces v (modulo float precision).
Properties2
phi: numberAngle in radians, measured from the positive X-axis.
radius: numberSource