| | |
- _aformat(a)
- colinear(points)
- Given 3 points, determine if they are colinear
Uses the definition which says that points are collinear
iff the distance from the line for point c to line a-b
is non-0 (that is, point c does not lie on a-b).
returns None or the first
- 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 float 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 float 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.
- orientToXYZR(a, b)
- Calculate axis/angle rotation transforming vec a -> vec b
|