Module

GLMatrix.Mat3

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

#Mat3 Source

data Mat3 :: Type

Instances

#add Source

add :: Mat3 -> Mat3 -> Mat3

Adds two Mat3's

#adjoint Source

adjoint :: Mat3 -> Mat3

Calculates the adjugate of a Mat3

#determinant Source

determinant :: Mat3 -> Number

Calculates the determinant of a Mat3

#equals Source

equals :: Mat3 -> Mat3 -> Boolean

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

#frob Source

frob :: Mat3 -> Number

Returns Frobenius norm of a Mat3

#fromRotation Source

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);

#fromValues Source

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

Create a new Mat3 with the given values

#identity Source

identity :: Mat3

Set a Mat3 to the identity matrix

#invert Source

invert :: Mat3 -> Mat3

Inverts a Mat3

#multiply Source

multiply :: Mat3 -> Mat3 -> Mat3

Multiplies two Mat3's

#multiplyScalar Source

multiplyScalar :: Mat3 -> Number -> Mat3

Multiply each element of the matrix by a scalar

#multiplyScalarAndAdd Source

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

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

#projection Source

projection :: Number -> Number -> Mat3

Generates a 2D projection matrix with the given bounds

#rotate Source

rotate :: Mat3 -> Number -> Mat3

Rotates a Mat3 by the given angle

#rotationX Source

rotationX :: Number -> Mat3

Creates a rotation matrix around the x-axis

#rotationY Source

rotationY :: Number -> Mat3

Creates a rotation matrix around the y-axis

#rotationZ Source

rotationZ :: Number -> Mat3

Creates a rotation matrix around the z-axis

#subtract Source

subtract :: Mat3 -> Mat3 -> Mat3

Subtracts matrix b from matrix a

#transpose Source

transpose :: Mat3 -> Mat3

Transpose the values of a Mat3

#numbers Source

numbers :: Mat3 -> Array Number

Extract a number array

#map Source

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 Source

unsafeFromNumbers :: Partial => Array Number -> Mat3

Create a matrix from an array produced by numbers.

#zipWith Source

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

#slice Source

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

Like Array.slice