| | |
- crossProduct(set1, set2)
- Compute element-wise cross-product of two arrays of vectors.
set1, set2 -- sequence objects with 1 or more
3-item vector values. If both sets are
longer than 1 vector, they must be the same
length.
returns a double array with x elements,
where x is the number of 3-element vectors
in the longer set
- crossProduct4(set1, set2)
- Cross-product of 3D vectors stored in 4D arrays
Identical to crossProduct otherwise.
- magnitude(vectors)
- Calculate the magnitudes of the given vectors
vectors -- sequence object with 1 or more
3-item vector values.
returns a double array with x elements,
where x is the number of 3-element vectors
- normalise(vectors)
- Get normalised versions of the vectors.
vectors -- sequence object with 1 or more
3-item vector values.
returns a double array with x 3-element vectors,
where x is the number of 3-element vectors in "vectors"
Will raise ZeroDivisionError if there are 0-magnitude
vectors in the set.
|