Vector3
is a three-dimensional vector data type.
angle-between
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] a)
(angle-between a b)
Get the angle between two vectors a and b.
anti-parallel?
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] Bool)
(anti-parallel? a b)
Check whether the two vectors a and b are anti-parallel.
cross
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] (Vector3 a))
(cross a b)
Compute the cross product of the two vectors x and y.
dist
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] a)
(dist a b)
Get the distance between the vectors a and b.
dot
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] a)
(dot a b)
Get the dot product of the two vectors x and y.
parallel?
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] Bool)
(parallel? a b)
Check whether the two vectors a and b are parallel.
perpendicular?
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] Bool)
(perpendicular? a b)
Check whether the two vectors a and b are perpendicular.
update-x
(Fn [(Vector3 a), (Ref (Fn [a] a b) c)] (Vector3 a))
updates the x property of a (Vector3 f) using a function f.
update-y
(Fn [(Vector3 a), (Ref (Fn [a] a b) c)] (Vector3 a))
updates the y property of a (Vector3 f) using a function f.
update-z
(Fn [(Vector3 a), (Ref (Fn [a] a b) c)] (Vector3 a))
updates the z property of a (Vector3 f) using a function f.
vapprox
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c)] Bool)
(vapprox a b)
Check whether the vectors a and b are approximately equal.
vlerp
(Fn [(Ref (Vector3 a) b), (Ref (Vector3 a) c), a] (Vector3 a))
(vlerp a b amnt)
Linearly interpolate between the two vectors a and b by amnt (between 0 and 1).