Module

GLMatrix.Vec4

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

#Vec4Source

data Vec4 :: Type

Instances

add :: Vec4 -> Vec4 -> Vec4

#ceilSource

ceil :: Vec4 -> Vec4

Math.ceil the components of a Vec4

#crossSource

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

#distanceSource

distance :: Vec4 -> Vec4 -> Number

Calculates the euclidian distance between two Vec4's

#divideSource

divide :: Vec4 -> Vec4 -> Vec4

Divides two Vec4's

#dotSource

dot :: Vec4 -> Vec4 -> Number

Calculates the dot product of two Vec4's

#equalsSource

equals :: Vec4 -> Vec4 -> Boolean

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

#floorSource

floor :: Vec4 -> Vec4

Math.floor the components of a Vec4

#fromValuesSource

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

Creates a new Vec4 initialized with the given values

#inverseSource

inverse :: Vec4 -> Vec4

Returns the inverse of the components of a Vec4

#lengthSource

length :: Vec4 -> Number

Calculates the length of a Vec4

#lerpSource

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

Performs a linear interpolation between two Vec4's

#maxSource

max :: Vec4 -> Vec4 -> Vec4

Returns the maximum of two Vec4's

#minSource

min :: Vec4 -> Vec4 -> Vec4

Returns the minimum of two Vec4's

#multiplySource

multiply :: Vec4 -> Vec4 -> Vec4

Multiplies two Vec4's

#negateSource

negate :: Vec4 -> Vec4

Negates the components of a Vec4

#normalizeSource

normalize :: Vec4 -> Vec4

Normalize a Vec4

#rotateXSource

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

Rotate a vector around the x-axis

#rotateYSource

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

Rotate a vector around the y-axis

#rotateZSource

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

Rotate a vector around the z-axis

#roundSource

round :: Vec4 -> Vec4

Math.round the components of a Vec4

#scaleSource

scale :: Vec4 -> Number -> Vec4

Scales a Vec4 by a scalar number

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

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

#squaredDistanceSource

squaredDistance :: Vec4 -> Vec4 -> Number

Calculates the squared euclidian distance between two Vec4's

#squaredLengthSource

squaredLength :: Vec4 -> Number

Calculates the squared length of a Vec4

#subtractSource

subtract :: Vec4 -> Vec4 -> Vec4

Subtracts vector b from vector a

#zeroSource

numbers :: Vec4 -> Array Number

Extract a number array

#mapSource

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 :: Partial => Array Number -> Vec4

Create a vector from an array produced by numbers.

#zipWithSource

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

#sliceSource

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

Like Array.slice