Package org.joml

Class Vector2i

java.lang.Object
org.joml.Vector2i
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Vector2ic

public class Vector2i
extends java.lang.Object
implements java.io.Externalizable, Vector2ic
See Also:
Serialized Form
  • Field Details

    • x

      public int x
    • y

      public int y
  • Constructor Details

    • Vector2i

      public Vector2i()
    • Vector2i

      public Vector2i​(int int1)
    • Vector2i

      public Vector2i​(int int1, int int2)
    • Vector2i

      public Vector2i​(Vector2ic vector2ic)
    • Vector2i

      public Vector2i​(java.nio.ByteBuffer byteBuffer)
    • Vector2i

      public Vector2i​(int int1, java.nio.ByteBuffer byteBuffer)
    • Vector2i

      public Vector2i​(java.nio.IntBuffer intBuffer)
    • Vector2i

      public Vector2i​(int int1, java.nio.IntBuffer intBuffer)
  • Method Details

    • x

      public int x()
      Specified by:
      x in interface Vector2ic
    • y

      public int y()
      Specified by:
      y in interface Vector2ic
    • set

      public Vector2i set​(int int1)
    • set

      public Vector2i set​(int int1, int int2)
    • set

      public Vector2i set​(Vector2ic vector2ic)
    • set

      public Vector2i set​(Vector2dc vector2dc)
    • set

      public Vector2i set​(java.nio.ByteBuffer byteBuffer)
    • set

      public Vector2i set​(int int1, java.nio.ByteBuffer byteBuffer)
    • set

      public Vector2i set​(java.nio.IntBuffer intBuffer)
    • set

      public Vector2i set​(int int1, java.nio.IntBuffer intBuffer)
    • setComponent

      public Vector2i setComponent​(int int1, int int2) throws java.lang.IllegalArgumentException
      Throws:
      java.lang.IllegalArgumentException
    • get

      public java.nio.ByteBuffer get​(java.nio.ByteBuffer byteBuffer)
      Specified by:
      get in interface Vector2ic
    • get

      public java.nio.ByteBuffer get​(int int1, java.nio.ByteBuffer byteBuffer)
      Specified by:
      get in interface Vector2ic
    • get

      public java.nio.IntBuffer get​(java.nio.IntBuffer intBuffer)
      Specified by:
      get in interface Vector2ic
    • get

      public java.nio.IntBuffer get​(int int1, java.nio.IntBuffer intBuffer)
      Specified by:
      get in interface Vector2ic
    • sub

      public Vector2i sub​(Vector2ic vector2ic)
    • sub

      public Vector2i sub​(Vector2ic vector2ic, Vector2i vector2i)
      Specified by:
      sub in interface Vector2ic
    • sub

      public Vector2i sub​(int int1, int int2)
    • sub

      public Vector2i sub​(int int1, int int2, Vector2i vector2i)
      Specified by:
      sub in interface Vector2ic
    • lengthSquared

      public long lengthSquared()
      Specified by:
      lengthSquared in interface Vector2ic
    • length

      public double length()
      Specified by:
      length in interface Vector2ic
    • distance

      public double distance​(Vector2ic vector2ic)
      Specified by:
      distance in interface Vector2ic
    • distance

      public double distance​(int int1, int int2)
      Specified by:
      distance in interface Vector2ic
    • distanceSquared

      public long distanceSquared​(Vector2ic vector2ic)
      Specified by:
      distanceSquared in interface Vector2ic
    • distanceSquared

      public long distanceSquared​(int int1, int int2)
      Specified by:
      distanceSquared in interface Vector2ic
    • add

      public Vector2i add​(Vector2ic vector2ic)
    • add

      public Vector2i add​(Vector2ic vector2ic, Vector2i vector2i)
      Specified by:
      add in interface Vector2ic
    • add

      public Vector2i add​(int int1, int int2)
    • add

      public Vector2i add​(int int1, int int2, Vector2i vector2i)
      Specified by:
      add in interface Vector2ic
    • mul

      public Vector2i mul​(int int1)
    • mul

      public Vector2i mul​(int int1, Vector2i vector2i)
      Specified by:
      mul in interface Vector2ic
    • mul

      public Vector2i mul​(Vector2ic vector2ic)
    • mul

      public Vector2i mul​(Vector2ic vector2ic, Vector2i vector2i)
      Specified by:
      mul in interface Vector2ic
    • mul

      public Vector2i mul​(int int1, int int2)
    • mul

      public Vector2i mul​(int int1, int int2, Vector2i vector2i)
      Specified by:
      mul in interface Vector2ic
    • zero

      public Vector2i zero()
    • writeExternal

      public void writeExternal​(java.io.ObjectOutput objectOutput) throws java.io.IOException
      Specified by:
      writeExternal in interface java.io.Externalizable
      Throws:
      java.io.IOException
    • readExternal

      public void readExternal​(java.io.ObjectInput objectInput) throws java.io.IOException, java.lang.ClassNotFoundException
      Specified by:
      readExternal in interface java.io.Externalizable
      Throws:
      java.io.IOException
      java.lang.ClassNotFoundException
    • negate

      public Vector2i negate()
    • negate

      public Vector2i negate​(Vector2i vector2i)
      Specified by:
      negate in interface Vector2ic
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object object)
      Overrides:
      equals in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • toString

      public java.lang.String toString​(java.text.NumberFormat numberFormat)
    • toImmutable

      public Vector2ic toImmutable()