#Mat2d Source

data Mat2d :: Type


#add Source

add :: Mat2d -> Mat2d -> Mat2d

Adds two Mat2d's

#determinant Source

determinant :: Mat2d -> Number

Calculates the determinant of a Mat2d

#equals Source

equals :: Mat2d -> Mat2d -> Boolean

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

#frob Source

frob :: Mat2d -> Number

Returns Frobenius norm of a Mat2d

#fromRotation Source

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 Source

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

Create a new Mat2d with the given values

#identity Source

identity :: Mat2d

Set a Mat2d to the identity matrix

#invert Source

invert :: Mat2d -> Mat2d

Inverts a Mat2d

#multiply Source

multiply :: Mat2d -> Mat2d -> Mat2d

Multiplies two Mat2d's

#multiplyScalar Source

multiplyScalar :: Mat2d -> Number -> Mat2d

Multiply each element of the matrix by a scalar

#multiplyScalarAndAdd Source

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

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

#rotate Source

rotate :: Mat2d -> Number -> Mat2d

Rotates a Mat2d by the given angle

#subtract Source

subtract :: Mat2d -> Mat2d -> Mat2d

Subtracts matrix b from matrix a

#numbers Source

numbers :: Mat2d -> Array Number

Extract a number array

#map Source

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 Source

unsafeFromNumbers :: Partial => Array Number -> Mat2d

Create a matrix from an array produced by numbers.

#zipWith Source

#slice Source

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

Like Array.slice