Module

GLMatrix.Vec3

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

#Vec3 Source

data Vec3 :: Type

Instances

#add Source

add :: Vec3 -> Vec3 -> Vec3

Adds two Vec3's

#angle Source

angle :: Vec3 -> Vec3 -> Number

Get the angle between two 2D vectors

#bezier Source

bezier :: Vec3 -> Vec3 -> Vec3 -> Vec3 -> Number -> Vec3

Performs a bezier interpolation with two control points

#ceil Source

ceil :: Vec3 -> Vec3

Math.ceil the components of a Vec3

#cross Source

cross :: Vec3 -> Vec3 -> Vec3

#distance Source

distance :: Vec3 -> Vec3 -> Number

Calculates the euclidian distance between two Vec3's

#divide Source

divide :: Vec3 -> Vec3 -> Vec3

Divides two Vec3's

#dot Source

dot :: Vec3 -> Vec3 -> Number

Calculates the dot product of two Vec3's

#equals Source

equals :: Vec3 -> Vec3 -> Boolean

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

#floor Source

floor :: Vec3 -> Vec3

Math.floor the components of a Vec3

#fromValues Source

fromValues :: Number -> Number -> Number -> Vec3

Creates a new Vec3 initialized with the given values

#hermite Source

hermite :: Vec3 -> Vec3 -> Vec3 -> Vec3 -> Number -> Vec3

Performs a hermite interpolation with two control points

#inverse Source

inverse :: Vec3 -> Vec3

Returns the inverse of the components of a Vec3

#length Source

length :: Vec3 -> Number

Calculates the length of a Vec3

#lerp Source

lerp :: Vec3 -> Vec3 -> Number -> Vec3

Performs a linear interpolation between two Vec3's

#max Source

max :: Vec3 -> Vec3 -> Vec3

Returns the maximum of two Vec3's

#min Source

min :: Vec3 -> Vec3 -> Vec3

Returns the minimum of two Vec3's

#multiply Source

multiply :: Vec3 -> Vec3 -> Vec3

Multiplies two Vec3's

#negate Source

negate :: Vec3 -> Vec3

Negates the components of a Vec3

#normalize Source

normalize :: Vec3 -> Vec3

Normalize a Vec3

#rotateX Source

rotateX :: Vec3 -> Vec3 -> Number -> Vec3

Rotate a 3D vector around the x-axis

#rotateY Source

rotateY :: Vec3 -> Vec3 -> Number -> Vec3

Rotate a 3D vector around the y-axis

#rotateZ Source

rotateZ :: Vec3 -> Vec3 -> Number -> Vec3

Rotate a 3D vector around the z-axis

#round Source

round :: Vec3 -> Vec3

Math.round the components of a Vec3

#scale Source

scale :: Vec3 -> Number -> Vec3

Scales a Vec3 by a scalar number

#scaleAndAdd Source

scaleAndAdd :: Vec3 -> Vec3 -> Number -> Vec3

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

#squaredDistance Source

squaredDistance :: Vec3 -> Vec3 -> Number

Calculates the squared euclidian distance between two Vec3's

#squaredLength Source

squaredLength :: Vec3 -> Number

Calculates the squared length of a Vec3

#subtract Source

subtract :: Vec3 -> Vec3 -> Vec3

Subtracts vector b from vector a

#numbers Source

numbers :: Vec3 -> Array Number

Extract a number array

#map Source

map :: (Number -> Number) -> Vec3 -> Vec3

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

Create a vector from an array produced by numbers.

#zipWith Source

zipWith :: (Number -> Number -> Number) -> Vec3 -> Vec3 -> Vec3

#slice Source

slice :: Int -> Int -> Vec3 -> Array Number

Like Array.slice