The vector's original magnitude. (This can be modified after Vector construction.)
The vector's original angle. (This can be modified after Vector construction.)
Vector options. Set to undefined
to disable all options.
Number of digits to round all values to. Set to undefined
to disable
rounding.
The vector's original angle. (This can be modified after Vector construction.)
The vector's distance in its given angle. (This can be modified after Vector construction.)
Readonly
optionsVector options. Set to undefined
to disable all options.
Number of digits to round all values to. Set to undefined
to disable
rounding.
Splits the vector into its X and Y components.
Static
fromCreate a new Vector instance from its X and Y components.
Number of digits to round all values to. Set to undefined
to disable
rounding.
Static
fromCreate a new Vector instance by calculating the distance and angle between two points.
Number of digits to round all values to. Set to undefined
to disable
rounding.
A vector (combination of magnitude and angle) definition. This can be defined in the following ways:
Vector.fromPoints()
Vector.fromComponents()
new Vector()