package brr

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

4x4 matrices.

type t

The type for DomMatrixReadOnly objects.

val is_2d : t -> bool

is_2d m is true iff the matrix was initialized as 2D matrix.

val is_identity : t -> bool

is_identity m is true iff the matrix is the identity matrix.

val inverse : t -> t

inverse m is m's inverse.

val multiply : t -> t -> t

multiply m m' multiplies m by m'.

Element accessors

For the order see here.

val m11 : t -> float
val m12 : t -> float
val m13 : t -> float
val m14 : t -> float
val m21 : t -> float
val m22 : t -> float
val m23 : t -> float
val m24 : t -> float
val m31 : t -> float
val m32 : t -> float
val m33 : t -> float
val m34 : t -> float
val m41 : t -> float
val m42 : t -> float
val m43 : t -> float
val m44 : t -> float
val a : t -> float
val b : t -> float
val c : t -> float
val d : t -> float
val e : t -> float
val f : t -> float

Typed array conversions

In arrays matrix elements are stored in column-major order.

val to_float32_array : t -> Brr.Tarray.float32
val of_float32_array : Brr.Tarray.float32 -> t
val to_float64_array : t -> Brr.Tarray.float64
val of_float64_array : Brr.Tarray.float64 -> t
OCaml

Innovation. Community. Security.