package scad_ml

  1. Overview
  2. Docs

An affine transformation matrix.

To be used with OpenSCADs multmatrix, which is applied in this library with Scad.multmatrix.

type t = private float array array
val of_row_list_exn : (float * float * float * float) list -> t

of_row_list_exn l

Create a rotation matrix from a list l of three or four rows. If only three rows are provided, the final row is set to [| 0.; 0.; 0.; 1. |] Throws an exception if l is not the correct length.

val of_row_list : (float * float * float * float) list -> (t, string) Stdlib.result
val to_string : t -> string
val mul : t -> t -> t
val add : t -> t -> t
val sub : t -> t -> t
val transpose : t -> t
val map : (float -> float) -> t -> t
val mul_scalar : t -> float -> t
val div_scalar : t -> float -> t
val add_scalar : t -> float -> t
val sub_scalar : t -> float -> t