Class Vec3f
java.lang.Object
com.seibel.distanthorizons.coreapi.util.math.Vec3f
A (almost) exact copy of Minecraft's 1.16.5
implementation of a 3 element float vector.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(float x, float y, float z) voidvoidclamp(float min, float max) copy()voidcrossProduct(Vec3f vector) floatdotProduct(Vec3f vector) booleaninthashCode()voidmul(float scalar) voidmul(float x, float y, float z) booleanReturns true if normalization had to be donevoidset(float[] values) voidset(float x, float y, float z) voidtoString()
-
Field Details
-
XNeg
-
XPos
-
YNeg
-
YPos
-
ZNeg
-
ZPos
-
x
public float x -
y
public float y -
z
public float z
-
-
Constructor Details
-
Vec3f
public Vec3f() -
Vec3f
public Vec3f(float x, float y, float z) -
Vec3f
public Vec3f(float[] values)
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
mul
public void mul(float scalar) -
mul
public void mul(float x, float y, float z) -
clamp
public void clamp(float min, float max) -
set
public void set(float x, float y, float z) -
add
public void add(float x, float y, float z) -
add
-
subtract
-
dotProduct
-
normalize
public boolean normalize()Returns true if normalization had to be done -
crossProduct
-
copy
-
toString
-
set
public void set(float[] values)
-