Module

GLMatrix.Vec4

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

#Vec4 Source

data Vec4 :: Type

Instances

#add Source

add :: Vec4 -> Vec4 -> Vec4

Adds two Vec4's

#ceil Source

ceil :: Vec4 -> Vec4

Math.ceil the components of a Vec4

#cross Source

cross :: Vec4 -> Vec4 -> Vec4 -> Vec4

#distance Source

distance :: Vec4 -> Vec4 -> Number

Calculates the euclidian distance between two Vec4's

#divide Source

divide :: Vec4 -> Vec4 -> Vec4

Divides two Vec4's

#dot Source

dot :: Vec4 -> Vec4 -> Number

Calculates the dot product of two Vec4's

#equals Source

equals :: Vec4 -> Vec4 -> Boolean

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

#floor Source

floor :: Vec4 -> Vec4

Math.floor the components of a Vec4

#fromValues Source

fromValues :: Number -> Number -> Number -> Number -> Vec4

Creates a new Vec4 initialized with the given values

#inverse Source

inverse :: Vec4 -> Vec4

Returns the inverse of the components of a Vec4

#length Source

length :: Vec4 -> Number

Calculates the length of a Vec4

#lerp Source

lerp :: Vec4 -> Vec4 -> Number -> Vec4

Performs a linear interpolation between two Vec4's

#max Source

max :: Vec4 -> Vec4 -> Vec4

Returns the maximum of two Vec4's

#min Source

min :: Vec4 -> Vec4 -> Vec4

Returns the minimum of two Vec4's

#multiply Source

multiply :: Vec4 -> Vec4 -> Vec4

Multiplies two Vec4's

#negate Source

negate :: Vec4 -> Vec4

Negates the components of a Vec4

#normalize Source

normalize :: Vec4 -> Vec4

Normalize a Vec4

#rotateX Source

rotateX :: Vec4 -> Vec4 -> Number -> Vec4

Rotate a vector around the x-axis

#rotateY Source

rotateY :: Vec4 -> Vec4 -> Number -> Vec4

Rotate a vector around the y-axis

#rotateZ Source

rotateZ :: Vec4 -> Vec4 -> Number -> Vec4

Rotate a vector around the z-axis

#round Source

round :: Vec4 -> Vec4

Math.round the components of a Vec4

#scale Source

scale :: Vec4 -> Number -> Vec4

Scales a Vec4 by a scalar number

#scaleAndAdd Source

scaleAndAdd :: Vec4 -> Vec4 -> Number -> Vec4

Adds two Vec4's after scaling the second operand by a scalar value

#squaredDistance Source

squaredDistance :: Vec4 -> Vec4 -> Number

Calculates the squared euclidian distance between two Vec4's

#squaredLength Source

squaredLength :: Vec4 -> Number

Calculates the squared length of a Vec4

#subtract Source

subtract :: Vec4 -> Vec4 -> Vec4

Subtracts vector b from vector a

#transformMat4 Source

#transformQuat Source

#numbers Source

numbers :: Vec4 -> Array Number

Extract a number array

#map Source

map :: (Number -> Number) -> Vec4 -> Vec4

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 -> Vec4

Create a vector from an array produced by numbers.

#zipWith Source

zipWith :: (Number -> Number -> Number) -> Vec4 -> Vec4 -> Vec4

#slice Source

slice :: Int -> Int -> Vec4 -> Array Number

Like Array.slice