Novelty scripting reference > Types > Vector4

Vector4

Four-dimentional vector.

Members

float x
float y
float z
float w


Constructors

Vector4()
Vector4(const Vector4 &in other)
Vector4(float x, float y, float z, float w)


Methods

void Set(float x, float y, float z, float w)
Set values.

void Add(float x, float y, float z, float w)
void Add(const Vector4 &in other)
Add another vector.

void Sub(float x, float y, float z, float w)
void Sub(const Vector4 &in other)
Subtract another vector.

void Scale(float factor)
Scale the vector by a factor.

void Interpolate(const Vector4 &in other, float value)
Do a linear interpolation between the vector and another.

float SquareLength() const
Returns square length of the vector.

float Length() const
Returns length of the vector.

float Dot(const Vector4 &in other) const
Calculates the dot product of the vector.

void Normalize()
Normalize the vector.

Vector4 Normalized() const
Returns a normalized vector.

string AsString() const
Returns the vector as a string


Back to top