![]()
Takes the absolute value of each component of vec0 storing the result in
resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Performs a component-wise addition of vec0 and vec1 together storing the
result into resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Divides each component of vec0 with the matching element of vec0
storing the divisor into resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Multiplies each component of vec0 with the matching element of vec0
storing the products into resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Creates a vec2f with all elements initialized to zero.
Returns: !goog.vec.vec2f.Type
The new vec2f.
|
code » | |||||
![]()
Returns a unit vector pointing from one point to another.
If the input points are equal then the result will be all zeros.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
Returns the distance between two points.
Arguments:
Returns: number
The distance between the points.
|
code » | |||||
Returns the squared distance between two points.
Arguments:
Returns: number
The squared distance between the points.
|
code » | |||||
Returns the scalar product of vectors vec0 and vec1.
Arguments:
Returns: number
The scalar product.
|
code » | |||||
Returns true if the components of vec0 are equal to the components of vec1.
Arguments:
Returns: boolean
True if the vectors are equal, false otherwise.
|
code » | |||||
![]()
Linearly interpolate from vec0 to vec1 according to f. The value of f should
be in the range [0..1] otherwise the results are undefined.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
Returns the magnitude of the given vector.
Arguments:
Returns: number
The magnitude of the vector.
|
code » | |||||
Returns the magnitudeSquared of the given vector.
Arguments:
Returns: number
The magnitude of the vector.
|
code » | |||||
![]()
Compares the components of vec0 with the components of another vector or
scalar, storing the larger values in resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Compares the components of vec0 with the components of another vector or
scalar, storing the smaller values in resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Negates vec0, storing the result into resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Normalizes the given vector storing the result into resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Multiplies each component of vec0 with scalar storing the product into
resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » | |||||
![]()
Initializes vec2f vec from Array src.
|
code » | |||||
![]()
Initializes the vector with the given values.
|
code » | |||||
![]()
Initializes vec2f vec from vec2d src (typed as a Float64Array to
avoid circular goog.requires).
Arguments:
Returns: !goog.vec.vec2f.Type
Return vec so that operations can be
chained together.
|
code » | |||||
![]()
Initializes vec2f vec from vec2f src.
Arguments:
Returns: !goog.vec.vec2f.Type
Return vec so that operations can be
chained together.
|
code » | |||||
![]()
Performs a component-wise subtraction of vec1 from vec0 storing the
result into resultVec.
Arguments:
Returns: !goog.vec.vec2f.Type
Return resultVec so that operations can be
chained together.
|
code » |
![]()
No description.
|
Code » |