Module

GLMatrix.Vec4

#Vec4

data Vec4 :: Type

Instances

#add

add :: Vec4 -> Vec4 -> Vec4

Adds two Vec4's

#ceil

ceil :: Vec4 -> Vec4

Math.ceil the components of a Vec4

#cross

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

#distance

distance :: Vec4 -> Vec4 -> Number

Calculates the euclidian distance between two Vec4's

#divide

divide :: Vec4 -> Vec4 -> Vec4

Divides two Vec4's

#dot

dot :: Vec4 -> Vec4 -> Number

Calculates the dot product of two Vec4's

#equals

equals :: Vec4 -> Vec4 -> Boolean

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

#floor

floor :: Vec4 -> Vec4

Math.floor the components of a Vec4

#fromValues

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

Creates a new Vec4 initialized with the given values

#inverse

inverse :: Vec4 -> Vec4

Returns the inverse of the components of a Vec4

#length

length :: Vec4 -> Number

Calculates the length of a Vec4

#lerp

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

Performs a linear interpolation between two Vec4's

#max

max :: Vec4 -> Vec4 -> Vec4

Returns the maximum of two Vec4's

#min

min :: Vec4 -> Vec4 -> Vec4

Returns the minimum of two Vec4's

#multiply

multiply :: Vec4 -> Vec4 -> Vec4

Multiplies two Vec4's

#negate

negate :: Vec4 -> Vec4

Negates the components of a Vec4

#normalize

normalize :: Vec4 -> Vec4

Normalize a Vec4

#rotateX

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

Rotate a vector around the x-axis

#rotateY

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

Rotate a vector around the y-axis

#rotateZ

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

Rotate a vector around the z-axis

#round

round :: Vec4 -> Vec4

Math.round the components of a Vec4

#scale

scale :: Vec4 -> Number -> Vec4

Scales a Vec4 by a scalar number

#scaleAndAdd

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

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

#squaredDistance

squaredDistance :: Vec4 -> Vec4 -> Number

Calculates the squared euclidian distance between two Vec4's

#squaredLength

squaredLength :: Vec4 -> Number

Calculates the squared length of a Vec4

#subtract

subtract :: Vec4 -> Vec4 -> Vec4

Subtracts vector b from vector a

#transformMat4

#transformQuat

#zero

#numbers

numbers :: Vec4 -> Array Number

Extract a number array

#map

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

unsafeFromNumbers :: Partial => Array Number -> Vec4

Create a vector from an array produced by numbers.

#zipWith

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

#slice

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

Like Array.slice

Modules