Function Summary | |
add(?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like vec1, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Performs a component-wise addition of vec0 and vec1 together storing the result into resultVec. | |
create() ⇒ !goog.vec.Vec4.Type Creates a 4 element vector of Float32Array. The array is initialized to zero. | |
createFromArray(?goog.vec.Vec4.Vec4Like vec) ⇒ !goog.vec.Vec4.Type Creates a new 4 element vector initialized with the value from the given array. | |
createFromValues(number v0, number v1, number v2, number v3) ⇒ !goog.vec.Vec4.Type Creates a new 4 element vector initialized with the supplied values. | |
dot(?goog.vec.Vec4.Vec4Like v0, ?goog.vec.Vec4.Vec4Like v1) ⇒ number Returns the scalar product of vectors v0 and v1. | |
equals(?goog.vec.Vec4.Vec4Like v0, ?goog.vec.Vec4.Vec4Like v1) ⇒ boolean Returns true if the components of v0 are equal to the components of v1. | |
lerp(?goog.vec.Vec4.Vec4Like v0, ?goog.vec.Vec4.Vec4Like v1, number f, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Linearly interpolate from v0 to v1 according to f. The value of f should be in the range [0..1] otherwise the results are undefined. | |
magnitude(?goog.vec.Vec4.Vec4Like vec0) ⇒ number Returns the magnitude of the given vector. | |
magnitudeSquared(?goog.vec.Vec4.Vec4Like vec0) ⇒ number Returns the magnitudeSquared of the given vector. | |
negate(?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Negates vec0, storing the result into resultVec. | |
normalize(?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Normalizes the given vector storing the result into resultVec. | |
scale(?goog.vec.Vec4.Vec4Like vec0, number scalar, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Multiplies each component of vec0 with scalar storing the product into resultVec. | |
setFromArray(?goog.vec.Vec4.Vec4Like vec, ?goog.vec.Vec4.Vec4Like values) Initializes the vector with the given array of values. | |
setFromValues(?goog.vec.Vec4.Vec4Like vec, number v0, number v1, number v2, number v3) Initializes the vector with the given values. | |
subtract(?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like vec1, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Performs a component-wise subtraction of vec1 from vec0 storing the result into resultVec. |