The angle of the vector in radians.
The magnitude (length) of the vector.
Draws the vector on a canvas.
The 2D rendering context of the canvas.
The origin point from which the vector starts, defaulting to [0, 0].
Optionaloptions: { color?: string }Additional options, such as stroke color.
StaticaddStaticaverageStaticfrom
Represents a 2D vector and provides various operations for vector arithmetic and transformations.
This class is useful for geometric computations, transformations, and rendering in 2D space.