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>
All Implemented Interfaces:
Cloneable<V>, Printable
Direct Known Subclasses:
Vector2f, Vector3f, Vector4f

public abstract class VectorFloat<V extends VectorFloat<V>> extends Vector<V>
Abstract class for vectors with floating point precision.
  • 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 class Vector<V extends VectorFloat<V>>
    • lengthSquared

      public abstract float lengthSquared()
      Calculates the squared length of this vector.
    • dot

      public abstract float dot(V vector)
      Calculates the dot product of this vector with another vector.
      Returns:
      Dot product of this vector multiplied by another vector
    • toBuffer

      public abstract void toBuffer(FloatBuffer buffer)
      Stores the vector in a given buffer.
      Parameters:
      buffer - The buffer to store the vector data in