Module

GLMatrix.Vec3

#Vec3

data Vec3 :: Type

Instances

#add

add :: Vec3 -> Vec3 -> Vec3

Adds two Vec3's

#angle

angle :: Vec3 -> Vec3 -> Number

Get the angle between two 2D vectors

#bezier

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

Performs a bezier interpolation with two control points

#ceil

ceil :: Vec3 -> Vec3

Math.ceil the components of a Vec3

#cross

cross :: Vec3 -> Vec3 -> Vec3

#distance

distance :: Vec3 -> Vec3 -> Number

Calculates the euclidian distance between two Vec3's

#divide

divide :: Vec3 -> Vec3 -> Vec3

Divides two Vec3's

#dot

dot :: Vec3 -> Vec3 -> Number

Calculates the dot product of two Vec3's

#equals

equals :: Vec3 -> Vec3 -> Boolean

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

#floor

floor :: Vec3 -> Vec3

Math.floor the components of a Vec3

#fromValues

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

Creates a new Vec3 initialized with the given values

#hermite

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

Performs a hermite interpolation with two control points

#inverse

inverse :: Vec3 -> Vec3

Returns the inverse of the components of a Vec3

#length

length :: Vec3 -> Number

Calculates the length of a Vec3

#lerp

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

Performs a linear interpolation between two Vec3's

#max

max :: Vec3 -> Vec3 -> Vec3

Returns the maximum of two Vec3's

#min

min :: Vec3 -> Vec3 -> Vec3

Returns the minimum of two Vec3's

#multiply

multiply :: Vec3 -> Vec3 -> Vec3

Multiplies two Vec3's

#negate

negate :: Vec3 -> Vec3

Negates the components of a Vec3

#normalize

normalize :: Vec3 -> Vec3

Normalize a Vec3

#rotateX

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

Rotate a 3D vector around the x-axis

#rotateY

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

Rotate a 3D vector around the y-axis

#rotateZ

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

Rotate a 3D vector around the z-axis

#round

round :: Vec3 -> Vec3

Math.round the components of a Vec3

#scale

scale :: Vec3 -> Number -> Vec3

Scales a Vec3 by a scalar number

#scaleAndAdd

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

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

#squaredDistance

squaredDistance :: Vec3 -> Vec3 -> Number

Calculates the squared euclidian distance between two Vec3's

#squaredLength

squaredLength :: Vec3 -> Number

Calculates the squared length of a Vec3

#subtract

subtract :: Vec3 -> Vec3 -> Vec3

Subtracts vector b from vector a

#zero

#numbers

numbers :: Vec3 -> Array Number

Extract a number array

#map

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

unsafeFromNumbers :: Partial => Array Number -> Vec3

Create a vector from an array produced by numbers.

#zipWith

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

#slice

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

Like Array.slice

Modules