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 floatCalculates the dot product of this vector with another vector.floatlength()Calculates the length of this vector.abstract floatCalculates the squared length of this vector.abstract voidtoBuffer(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:VectorCalculates the length of this vector.- Specified by:
lengthin 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
-