Function Summary | |
add(?goog.vec.Vec4.AnyType vec0, ?goog.vec.Vec4.AnyType vec1, ?goog.vec.Vec4.AnyType resultVec) ⇒ !goog.vec.Vec4.AnyType 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. | |
createFloat32() ⇒ !goog.vec.Vec4.Float32 Creates a 4 element vector of Float32. The array is initialized to zero. | |
createFloat32FromArray(?goog.vec.Vec4.AnyType vec) ⇒ !goog.vec.Vec4.Float32 Creates a new 4 element FLoat32 vector initialized with the value from the given array. | |
createFloat32FromValues(number v0, number v1, number v2, number v3) ⇒ !goog.vec.Vec4.Float32 Creates a new 4 element Float32 vector initialized with the supplied values. | |
createFloat64() ⇒ !goog.vec.Vec4.Float64 Creates a 4 element vector of Float64. The array is initialized to zero. | |
createFloat64FromArray(?goog.vec.Vec4.AnyType vec) ⇒ !goog.vec.Vec4.Float64 Creates a new 4 element Float64 vector initialized with the value from the given array. | |
createFloat64FromValues(number v0, number v1, number v2, number v3) ⇒ !goog.vec.Vec4.Float64 Creates a new 4 element Float64 vector initialized with the supplied values. | |
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. | |
createNumber() ⇒ !goog.vec.Vec4.Number Creates a 4 element vector of Number. The array is initialized to zero. | |
dot(?goog.vec.Vec4.AnyType v0, ?goog.vec.Vec4.AnyType v1) ⇒ number Returns the scalar product of vectors v0 and v1. | |
equals(?goog.vec.Vec4.AnyType v0, ?goog.vec.Vec4.AnyType v1) ⇒ boolean Returns true if the components of v0 are equal to the components of v1. | |
lerp(?goog.vec.Vec4.AnyType v0, ?goog.vec.Vec4.AnyType v1, number f, ?goog.vec.Vec4.AnyType resultVec) ⇒ !goog.vec.Vec4.AnyType 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.AnyType vec0) ⇒ number Returns the magnitude of the given vector. | |
magnitudeSquared(?goog.vec.Vec4.AnyType vec0) ⇒ number Returns the magnitudeSquared of the given vector. | |
negate(?goog.vec.Vec4.AnyType vec0, ?goog.vec.Vec4.AnyType resultVec) ⇒ !goog.vec.Vec4.AnyType Negates vec0, storing the result into resultVec. | |
normalize(?goog.vec.Vec4.AnyType vec0, ?goog.vec.Vec4.AnyType resultVec) ⇒ !goog.vec.Vec4.AnyType Normalizes the given vector storing the result into resultVec. | |
scale(?goog.vec.Vec4.AnyType vec0, number scalar, ?goog.vec.Vec4.AnyType resultVec) ⇒ !goog.vec.Vec4.AnyType Multiplies each component of vec0 with scalar storing the product into resultVec. | |
setFromArray(?goog.vec.Vec4.AnyType vec, ?goog.vec.Vec4.AnyType values) ⇒ !goog.vec.Vec4.AnyType Initializes the vector with the given array of values. | |
setFromValues(?goog.vec.Vec4.AnyType vec, number v0, number v1, number v2, number v3) ⇒ !goog.vec.Vec4.AnyType Initializes the vector with the given values. | |
subtract(?goog.vec.Vec4.AnyType vec0, ?goog.vec.Vec4.AnyType vec1, ?goog.vec.Vec4.AnyType resultVec) ⇒ !goog.vec.Vec4.AnyType Performs a component-wise subtraction of vec1 from vec0 storing the result into resultVec. |