Cog Files


Vector Reference

Vector handling functions

VectorAdd
VectorCross
VectorDist
VectorDot
VectorLen
VectorNorm
VectorScale
VectorSet
VectorSub
VectorX
VectorY
VectorZ


VectorAdd() Function

Adds two vectors.

Use sum = VectorAdd(vector,vector); returns the sum of the two vectors


VectorCross() Function

Crosses two vectors

Use: cross = VectorCross(vector,vector); returns the cross product of the two vectors (a vector).


VectorDist() Function

Gets the distance between two vectors.

Use: distance = VectorDist(vector,vector); returns a flex


VectorDot()

Dots two vectors

Use: dot = VectorDot(vector,vector); returns the dot product of the two vectors (a flex).


VectorLen() Function

Gets the length of a vector

Use: length = VectorLen(vector);Returns a flex


VectorNorm() Function

Normalises a vector

Use: norm = VectorNorm(vector); returns vector


VectorScale() Function

Scales a vector

Use: scaled = VectorScale(Vector,flex); returns vector


VectorSet() Function

Creates a vector

Use: newvector = VectorSet(Flex X,Flex Y,Flex Z); returns a vector


VectorSub() Function

Subtracts two Vectors.

Use: Newvec = VectorSub(vector,vector); returns vector


VectorX() Function

Gets the "X" part of a vector.

Use: Xflex = VectorX(vector); returns flex


VectorY() Function

Gets the "Y" part of a vector

Use: Yflex = VectorY(vector); returns flex


VectorZ() Function

Gets the "Z" part of a vector

Use: Zflex = VectorZ(vector); returns flex