Module

GLMatrix.Mat3

Package
purescript-gl-matrix
Repository
dirkz/purescript-gl-matrix

#Mat3Source

data Mat3 :: Type

Instances

add :: Mat3 -> Mat3 -> Mat3

Calculates the adjugate of a Mat3

#determinantSource

determinant :: Mat3 -> Number

Calculates the determinant of a Mat3

#equalsSource

equals :: Mat3 -> Mat3 -> Boolean

Returns whether or not the matrices have approximately the same elements in the same position

#frobSource

frob :: Mat3 -> Number

Returns Frobenius norm of a Mat3

#fromRotationSource

fromRotation :: Number -> Mat3

Creates a matrix from a given angle This is equivalent to (but much faster than): mat3.identity(dest); mat3.rotate(dest, dest, rad);

#fromValuesSource

fromValues :: Number -> Number -> Number -> Number -> Number -> Number -> Number -> Number -> Number -> Mat3

Create a new Mat3 with the given values

#identitySource

identity :: Mat3

Set a Mat3 to the identity matrix

#invertSource

invert :: Mat3 -> Mat3

Inverts a Mat3

#multiplySource

multiply :: Mat3 -> Mat3 -> Mat3

Multiplies two Mat3's

#multiplyScalarSource

multiplyScalar :: Mat3 -> Number -> Mat3

Multiply each element of the matrix by a scalar

multiplyScalarAndAdd :: Mat3 -> Mat3 -> Number -> Mat3

Adds two Mat3's after multiplying each element of the second operand by a scalar value

#projectionSource

projection :: Number -> Number -> Mat3

Generates a 2D projection matrix with the given bounds

#rotateSource

rotate :: Mat3 -> Number -> Mat3

Rotates a Mat3 by the given angle

#rotationXSource

rotationX :: Number -> Mat3

Creates a rotation matrix around the x-axis

#rotationYSource

rotationY :: Number -> Mat3

Creates a rotation matrix around the y-axis

#rotationZSource

rotationZ :: Number -> Mat3

Creates a rotation matrix around the z-axis

#subtractSource

subtract :: Mat3 -> Mat3 -> Mat3

Subtracts matrix b from matrix a

#transposeSource

transpose :: Mat3 -> Mat3

Transpose the values of a Mat3

numbers :: Mat3 -> Array Number

Extract a number array

#mapSource

map :: (Number -> Number) -> Mat3 -> Mat3

Map a function from Number to Number over it. Note: Since this is not a general container, it cannot be a Functor.

unsafeFromNumbers :: Partial => Array Number -> Mat3

Create a matrix from an array produced by numbers.

#zipWithSource

zipWith :: (Number -> Number -> Number) -> Mat3 -> Mat3 -> Mat3

#sliceSource

slice :: Int -> Int -> Mat3 -> Array Number

Like Array.slice