package brr

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

Module Brr_canvas.Matrix4Source

4x4 matrices.

Sourcetype t

The type for DomMatrixReadOnly objects.

Sourceval is_2d : t -> bool

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

Sourceval is_identity : t -> bool

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

Sourceval inverse : t -> t

inverse m is m's inverse.

Sourceval multiply : t -> t -> t

multiply m m' multiplies m by m'.

Element accessors

For the order see here.

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

Typed array conversions

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

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