zero : Vec3
(0, 0, 0).
:= []
Arithmetic on 3D vectors. The record has the same shape as Vocabulary.Vec3,
so you can pass one where the other goes.
zero : Vec3
(0, 0, 0).
one : Vec3
(1, 1, 1), a scale that changes nothing.
add : Vec3, Vec3 -> Vec3
a + b, one axis at a time.
sub : Vec3, Vec3 -> Vec3
a - b, one axis at a time.
neg : Vec3 -> Vec3
The vector that points the other way.
Multiplies each axis by s.
The dot product.
cross : Vec3, Vec3 -> Vec3
The cross product, right-handed: cross(x, y) is z.
The length.
normalize : Vec3 -> Vec3
The vector with length 1 in the same direction. Zero stays zero, so you never divide by a zero length.
The point a fraction t of the way from a to b. t of 0 gives a
and 1 gives b.
A point or a direction in 3D.