Class: Vector

Vector(xopt, yopt)

Vector

Constructor

new Vector(xopt, yopt)

Constructs a vector.
Parameters:
Name Type Attributes Default Description
x number <optional>
0 X value for vector.
y Number <optional>
0 Y value for vector.
Source:

Methods

(static) add2(mag) → {Vector}

Set mag to input if mag is greater than input;
Parameters:
Name Type Description
mag Number Magnitude to limit to.
Source:
Returns:
This vector.
Type
Vector