goog.vec.vec4d
Functions
abs( vec0, resultVec ) → Float64Array
Float64Array
Takes the absolute value of each component of vec0 storing the result in resultVec.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
add( vec0, vec1, resultVec ) → Float64Array
Float64Array
Performs a component-wise addition of vec0 and vec1 together storing the result into resultVec.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
clone( vec ) → Float64Array
Float64Array
Creates a clone of the given vec4d.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
create() → Float64Array
Float64Array
Creates a vec4d with all elements initialized to zero.
Parameters | None. | ||
---|---|---|---|
Returns |
|
createFromArray( vec ) → Float64Array
Float64Array
createFromValues( v0, v1, v2, v3 ) → Float64Array
Float64Array
dot( v0, v1 ) → number
number
Returns the scalar product of vectors v0 and v1.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
equals( v0, v1 ) → boolean
boolean
Returns true if the components of v0 are equal to the components of v1.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
lerp( v0, v1, f, resultVec ) → Float64Array
Float64Array
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.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
magnitude( vec0 ) → number
number
Returns the magnitude of the given vector.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
magnitudeSquared( vec0 ) → number
number
Returns the magnitudeSquared of the given vector.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
max( vec0, limit, resultVec ) → Float64Array
Float64Array
Compares the components of vec0 with the components of another vector or scalar, storing the larger values in resultVec.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
min( vec0, limit, resultVec ) → Float64Array
Float64Array
Compares the components of vec0 with the components of another vector or scalar, storing the smaller values in resultVec.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
negate( vec0, resultVec ) → Float64Array
Float64Array
Negates vec0, storing the result into resultVec.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
normalize( vec0, resultVec ) → Float64Array
Float64Array
Normalizes the given vector storing the result into resultVec.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
scale( vec0, scalar, resultVec ) → Float64Array
Float64Array
Multiplies each component of vec0 with scalar storing the product into resultVec.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
setFromArray( vec, src ) → Float64Array
Float64Array
setFromValues( vec, v0, v1, v2, v3 ) → Float64Array
Float64Array
Initializes the vector with the given values.
Parameters |
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
setFromVec4d( vec, src ) → Float64Array
Float64Array
Initializes vec4d vec from vec4d src.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
setFromVec4f( vec, src ) → Float64Array
Float64Array
Initializes vec4d vec from vec4f src (typed as a Float32Array to avoid circular goog.requires).
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
subtract( vec0, vec1, resultVec ) → Float64Array
Float64Array
Performs a component-wise subtraction of vec1 from vec0 storing the result into resultVec.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Properties
Type → Float64Array
Float64Array
No information.