Class VectorFloat<V extends VectorFloat<V>>
java.lang.Object
dev.prozilla.pine.common.math.vector.Vector<V>
dev.prozilla.pine.common.math.vector.VectorFloat<V>
Abstract class for vectors with floating point precision.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract float
Calculates the dot product of this vector with another vector.float
length()
Calculates the length of this vector.abstract float
Calculates the squared length of this vector.abstract void
toBuffer
(FloatBuffer buffer) 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
-
VectorFloat
public VectorFloat()
-
-
Method Details
-
length
public float length()Description copied from class:Vector
Calculates the length of this vector.- Specified by:
length
in classVector<V extends VectorFloat<V>>
-
lengthSquared
public abstract float 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
-