Vector3

Constructors

this
this(float x, float y, float z)
this
this(Vector2 vector)

Members

Functions

cross
Vector3 cross(Vector3 vector)

Returns the cross product of the two vectors

distanceTo
float distanceTo(Vector3 vector)

Returns the distance between the vectors

distanceToSquared
float distanceToSquared(Vector3 vector)

Returns the squared distance between the vectors

dot
float dot(Vector3 vector)

Returns the dot product of the two vectors

getDirection
Quaternion getDirection()
getMagnitude
float getMagnitude()

Returns the magnitude of the vector

getNormalized
Vector3 getNormalized()

Returns a normalized copy of this vector

normalize
void normalize()

Normalizes the vector

opAdd
Vector3 opAdd(Vector3 vector)
opAdd
Vector3 opAdd(Vector2 vector)
opAddAssign
Vector3 opAddAssign(Vector3 vector)
opAddAssign
Vector3 opAddAssign(Vector2 vector)
opAssign
void opAssign(Vector2 vector)
opDiv
Vector3 opDiv(Vector3 vector)
opDiv
Vector3 opDiv(float a)
opDivAssign
Vector3 opDivAssign(Vector3 vector)
opDivAssign
Vector3 opDivAssign(float a)
opMul
Vector3 opMul(Vector3 vector)
opMul
Vector3 opMul(float a)
opMulAssign
Vector3 opMulAssign(Vector3 vector)
opMulAssign
Vector3 opMulAssign(float a)
opSub
Vector3 opSub(Vector3 vector)
opSub
Vector3 opSub(Vector2 vector)
opSubAssign
Vector3 opSubAssign(Vector3 vector)
opSubAssign
Vector3 opSubAssign(Vector2 vector)
opUnary
Vector3 opUnary()
set
void set(float x, float y, float z)

Sets the values of x, y, and z in a single statement

setMagnitude
void setMagnitude(float magnitude)

Sets the magnitude of this vector

Properties

xy
Vector2 xy [@property getter]

Static functions

random
Vector3 random()

Creates a normalized vector with a random direction

Static variables

back
auto back;
down
auto down;
forward
auto forward;
left
auto left;
right
auto right;
up
auto up;

Variables

x
float x;
y
float y;
z
float z;

Meta