Class VectorInt<V extends VectorInt<V>>
java.lang.Object
dev.prozilla.pine.common.math.vector.Vector<V>
dev.prozilla.pine.common.math.vector.VectorInt<V>
Abstract class for vectors with integer precision.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Calculates the dot product of this vector with another vector.float
length()
Calculates the length of this vector.abstract int
Calculates the squared length of this vector.abstract void
Stores the vector in a given buffer.Methods inherited from class dev.prozilla.pine.common.math.vector.Vector
add, clone, divide, equals, equals, hashCode, lerp, negate, normalize, parseToFloats, parseToFloats, parseToIntegers, parseToIntegers, parseToNumbers, scale, subtract, toString
-
Constructor Details
-
VectorInt
public VectorInt()
-
-
Method Details
-
length
public float length()Description copied from class:Vector
Calculates the length of this vector. -
lengthSquared
public abstract int lengthSquared()Calculates the squared length of this vector. -
dot
Calculates the dot product of this vector with another vector.- Returns:
- Dot product of this vector multiplied by another vector
-
toBuffer
Stores the vector in a given buffer.- Parameters:
buffer
- The buffer to store the vector data in
-