Vec3
A simple object that holds X, Y and Z values
new Vec3(double x, double y, double z)
new Vec3(double x, double y, double z)
Creates a Vec3 with the given x
, y
and z
getX(): double
getX(): double
Returns the x
value
getY(): double
getY(): double
Returns the y
value
getZ(): double
getZ(): double
Returns the z
value
getLength(): double
getLength(): double
Returns the length
of the vector.
distanceTo(Vec3 vec3): double
distanceTo(Vec3 vec3): double
Calculates and returns the distance from another Vec3
add(Vec3 add): Vec3
add(Vec3 add): Vec3
Returns a new Vec3
with the combined value.
subtract(Vec3 subtract): Vec3
subtract(Vec3 subtract): Vec3
Subtracts substract
from itself and returns it as new Vec3
.
normalize(): Vec3
normalize(): Vec3
Returns the normalized Vec3
of the vector you call this on.
Last updated