Source: https://erratique.ch/software/gg/doc/Gg.V4.html
Timestamp: 2019-04-24 20:30:41+00:00

Document:
The type for 4D vectors.
dim is the dimension of vectors of type Gg.v4.
The type for matrices representing linear transformations of 4D space.
v x y z w is the vector (x y z w).
comp i v is vi, the ith component of v.
Raises Invalid_argument if i is not in [0;Gg.V4.dim[.
x v is the x component of v.
y v is the y component of v.
z v is the z component of v.
ox is the unit vector (1. 0. 0. 0.).
oy is the unit vector (0. 1. 0. 0.).
oz is the unit vector (0. 0. 1. 0.).
ow is the unit vector (0. 0. 0. 1.).
zero is the neutral element for Gg.V4.add.
infinity is the vector whose components are infinity.
neg_infinity is the vector whose components are neg_infinity.
basis i is the ith vector of an orthonormal basis of the vector space Gg.V4.t with inner product Gg.V4.dot.
of_tuple (x, y, z, w) is v x y z w.
to_tuple v is (x v, y v, z v, w v).
of_v2 u z w is v (V2.x u) (V2.y u) z w.
of_v3 u w is v (V3.x u) (V3.y u) (V3.z u) w.
neg v is the inverse vector -v.
add u v is the vector addition u + v.
sub u v is the vector subtraction u - v.
mul u v is the component wise multiplication u * v.
div u v is the component wise division u / v.
smul s v is the scalar multiplication sv.
half v is the half vector smul 0.5 v.
dot u v is the dot product u.v.
norm v is the norm |v| = sqrt v.v.
norm2 v is the squared norm |v|2 .
unit v is the unit vector v/|v|.
homogene v is the vector v/vw if vw <> 0 and v otherwise.
mix u v t is the linear interpolation u + t(v - u).
ltr m v is the linear transform mv.
u + v is add u v.
u - v is sub u v.
t * v is smul t v.
v / t is smul (1. /. t) v.
map f v is the component wise application of f to v.
mapi f v is like Gg.V4.map but the component index is also given.
fold f acc v is f (...(f (f acc v0) v1)...).
foldi f acc v is f (...(f (f acc 0 v0) 1 v1)...).
equal u v is u = v.
equal_f eq u v tests u and v like Gg.V4.equal but uses eq to test floating point values.
compare u v is Pervasives.compare u v.
compare_f cmp u v compares u and v like Gg.V4.compare but uses cmp to compare floating point values.
pp ppf v prints a textual representation of v on ppf.
pp_f pp_comp ppf v prints v like Gg.V4.pp but uses pp_comp to print floating point values.

References: v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.

 v.