euclidean.math.vector documentation

add

(add v)(add v1 v2)(add v1 v2 & more)
Return the sum of one or more vectors.

cross

(cross v1 v2)
Find the cross-product of two 3D vectors.

div

(div v)(div v1 v2)(div v1 v2 & more)
If only one vector is supplied, return 1/value for x, y and z. Otherwise
the first vector is divided by all other vectors.

dot

(dot v1 v2)
Find the dot-product of two vectors.

get-x

(get-x v)
Find the x coordinate of a vector.

get-y

(get-y v)
Find the y coordinate of a vector.

get-z

(get-z v)
Find the z coordinate of a vector.

magnitude

(magnitude v)
The magnitude (length) of the vector.

mult

(mult v)(mult v1 v2)(mult v1 v2 & more)
Return the product of each x, y and z value in one or more vectors.

normalize

(normalize v)
Normalize a vector by dividing by its magnitude.

scale

(scale v f)
Scale a vector by a factor.

sub

(sub v)(sub v1 v2)(sub v1 v2 & more)
If only one vector is supplied, return the negation of the vector. Otherwise
all subsequent vectors are subtracted from the first.

vector

(vector x y)(vector x y z)
Create a new 2D or 3D math vector.