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>
All Implemented Interfaces:
Cloneable<V>, Printable
Direct Known Subclasses:
Vector2i, Vector3i, Vector4i

public abstract class VectorInt<V extends VectorInt<V>> extends Vector<V>
Abstract class for vectors with integer precision.
  • Constructor Details

    • VectorInt

      public VectorInt()
  • 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 VectorInt<V>>
    • lengthSquared

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

      public abstract int 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(IntBuffer buffer)
      Stores the vector in a given buffer.
      Parameters:
      buffer - The buffer to store the vector data in