Module

GLMatrix.Mat2d

#Mat2d

data Mat2d :: Type

Instances

#add

add :: Mat2d -> Mat2d -> Mat2d

Adds two Mat2d's

#determinant

determinant :: Mat2d -> Number

Calculates the determinant of a Mat2d

#equals

equals :: Mat2d -> Mat2d -> Boolean

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

#frob

frob :: Mat2d -> Number

Returns Frobenius norm of a Mat2d

#fromRotation

fromRotation :: Number -> Mat2d

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

#fromValues

fromValues :: Number -> Number -> Number -> Number -> Number -> Number -> Mat2d

Create a new Mat2d with the given values

#identity

identity :: Mat2d

Set a Mat2d to the identity matrix

#invert

invert :: Mat2d -> Mat2d

Inverts a Mat2d

#multiply

multiply :: Mat2d -> Mat2d -> Mat2d

Multiplies two Mat2d's

#multiplyScalar

multiplyScalar :: Mat2d -> Number -> Mat2d

Multiply each element of the matrix by a scalar

#multiplyScalarAndAdd

multiplyScalarAndAdd :: Mat2d -> Mat2d -> Number -> Mat2d

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

#rotate

rotate :: Mat2d -> Number -> Mat2d

Rotates a Mat2d by the given angle

#subtract

subtract :: Mat2d -> Mat2d -> Mat2d

Subtracts matrix b from matrix a

#numbers

numbers :: Mat2d -> Array Number

Extract a number array

#map

map :: (Number -> Number) -> Mat2d -> Mat2d

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

#unsafeFromNumbers

unsafeFromNumbers :: Partial => Array Number -> Mat2d

Create a matrix from an array produced by numbers.

#zipWith

#slice

slice :: Int -> Int -> Mat2d -> Array Number

Like Array.slice

Modules