Skip to content

Vector4

Calvin Day edited this page Jul 6, 2021 · 3 revisions

The Vector4 data structure is used to store four floats as an x, y, z, w coordinate quartet.

Constructors

Vector4()

Vector4 quad = new Vector4();
Results in a Vector4 with the value of 0, 0, 0, 0

Vector4(float x, float y, float z, float w)

Vector4 position = new Vector4(55, 67.4f, 4.3f, 5);
Results in a Vector4 with the value of 55, 67.4f, 4.3f, 5

Methods

setX(float x)

quad.setX(53);
Sets the value of x to 53

setY(float y)

quad.setY(326);
Sets the value of y to 326

setZ(float z)

quad.setZ(33);
Sets the value of z to 33

setW(float w)

quad.setW(6);
Sets the value of w to 6

getX()

quad.getX();
Returns the value of x

getY()

quad.getY();
Returns the value of y

getZ()

quad.getZ();
Returns the value of z

getW()

quad.getW();
Returns the value of w
Clone this wiki locally