Returns the difference between two vectors as a new Vec2.
Arguments:
Returns: !goog.math.Vec2
The difference vector.
|
code » | ||||
Returns the distance between two vectors.
Arguments:
Returns: number
The distance.
|
code » | ||||
Returns the dot-product of two vectors.
Arguments:
Returns: number
The dot-product of the two vectors.
|
code » | ||||
Compares vectors for equality.
Arguments:
Returns: boolean
Whether the vectors have the same x and y coordinates.
|
code » | ||||
Returns a new Vec2 object from a given coordinate.
Arguments:
Returns: !goog.math.Vec2
A new vector object.
|
code » | ||||
Returns a new Vec2 that is the linear interpolant between vectors a and b at
scale-value x.
Arguments:
Returns: !goog.math.Vec2
The interpolated vector.
|
code » | ||||
No description.
Returns: !goog.math.Vec2
A random vector inside the unit-disc.
|
code » | ||||
No description.
Returns: !goog.math.Vec2
A random unit-length vector.
|
code » | ||||
Rotates a vector by a given angle, specified in radians, relative to a given
axis rotation point. The returned vector is a newly created instance - no
in-place changes are done.
Arguments:
Returns: !goog.math.Vec2
The rotated vector in a newly created instance.
|
code » | ||||
Returns the squared distance between two vectors.
Arguments:
Returns: number
The squared distance.
|
code » | ||||
Returns the sum of two vectors as a new Vec2.
Arguments:
Returns: !goog.math.Vec2
The sum vector.
|
code » |