Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A rotation matrix.
Used in conjunction with Quaternion
to provide an additional means of rotating OpenSCAD objects and vectors (Vec3.t
).
val of_row_list_exn : (float * float * float) list -> t
of_row_list_exn l
Create a rotation matrix from a list l
of three rows. Throws an exception if l
is not the correct length.
val of_col_list_exn : (float * float * float) list -> t
of_col_list_exn l
Create a rotation matrix from a list l
of three columns. Throws an exception if l
is not the correct length.
align_exn a b
Calculate a rotation matrix that would bring a
into alignment with b
. Throws an exception if the vectors are equal or zero.
val trace : t -> float
trace t
Sum the elements on the main diagonal (upper left to lower right) of t
.
val get : t -> int -> int -> float
get t r c
Get the element at r
ow and c
olumn of t
. Equivalent to t.(r).(c)
.