Package org.joml

Class Vector2d

java.lang.Object
org.joml.Vector2d
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Vector2dc

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

    • x

      public double x
    • y

      public double y
  • Constructor Details

    • Vector2d

      public Vector2d()
    • Vector2d

      public Vector2d​(double double1)
    • Vector2d

      public Vector2d​(double double1, double double2)
    • Vector2d

      public Vector2d​(Vector2dc vector2dc)
    • Vector2d

      public Vector2d​(Vector2fc vector2fc)
    • Vector2d

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

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

      public Vector2d​(java.nio.DoubleBuffer doubleBuffer)
    • Vector2d

      public Vector2d​(int int1, java.nio.DoubleBuffer doubleBuffer)
  • Method Details

    • x

      public double x()
      Specified by:
      x in interface Vector2dc
    • y

      public double y()
      Specified by:
      y in interface Vector2dc
    • set

      public Vector2d set​(double double1)
    • set

      public Vector2d set​(double double1, double double2)
    • set

      public Vector2d set​(Vector2dc vector2dc)
    • set

      public Vector2d set​(Vector2fc vector2fc)
    • set

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

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

      public Vector2d set​(java.nio.DoubleBuffer doubleBuffer)
    • set

      public Vector2d set​(int int1, java.nio.DoubleBuffer doubleBuffer)
    • setComponent

      public Vector2d setComponent​(int int1, double double1) throws java.lang.IllegalArgumentException
      Throws:
      java.lang.IllegalArgumentException
    • get

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

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

      public java.nio.DoubleBuffer get​(java.nio.DoubleBuffer doubleBuffer)
      Specified by:
      get in interface Vector2dc
    • get

      public java.nio.DoubleBuffer get​(int int1, java.nio.DoubleBuffer doubleBuffer)
      Specified by:
      get in interface Vector2dc
    • perpendicular

      public Vector2d perpendicular()
    • sub

      public Vector2d sub​(Vector2dc vector2dc)
    • sub

      public Vector2d sub​(double double1, double double2)
    • sub

      public Vector2d sub​(double double1, double double2, Vector2d vector2d)
      Specified by:
      sub in interface Vector2dc
    • sub

      public Vector2d sub​(Vector2fc vector2fc)
    • sub

      public Vector2d sub​(Vector2dc vector2dc, Vector2d vector2d)
      Specified by:
      sub in interface Vector2dc
    • sub

      public Vector2d sub​(Vector2fc vector2fc, Vector2d vector2d)
      Specified by:
      sub in interface Vector2dc
    • mul

      public Vector2d mul​(double double1)
    • mul

      public Vector2d mul​(double double1, Vector2d vector2d)
      Specified by:
      mul in interface Vector2dc
    • mul

      public Vector2d mul​(double double1, double double2)
    • mul

      public Vector2d mul​(double double1, double double2, Vector2d vector2d)
      Specified by:
      mul in interface Vector2dc
    • mul

      public Vector2d mul​(Vector2dc vector2dc)
    • mul

      public Vector2d mul​(Vector2dc vector2dc, Vector2d vector2d)
      Specified by:
      mul in interface Vector2dc
    • dot

      public double dot​(Vector2dc vector2dc)
      Specified by:
      dot in interface Vector2dc
    • angle

      public double angle​(Vector2dc vector2dc)
      Specified by:
      angle in interface Vector2dc
    • length

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

      public double distance​(Vector2dc vector2dc)
      Specified by:
      distance in interface Vector2dc
    • distance

      public double distance​(Vector2fc vector2fc)
      Specified by:
      distance in interface Vector2dc
    • distance

      public double distance​(double double1, double double2)
      Specified by:
      distance in interface Vector2dc
    • normalize

      public Vector2d normalize()
    • normalize

      public Vector2d normalize​(Vector2d vector2d)
      Specified by:
      normalize in interface Vector2dc
    • add

      public Vector2d add​(Vector2dc vector2dc)
    • add

      public Vector2d add​(double double1, double double2)
    • add

      public Vector2d add​(double double1, double double2, Vector2d vector2d)
      Specified by:
      add in interface Vector2dc
    • add

      public Vector2d add​(Vector2fc vector2fc)
    • add

      public Vector2d add​(Vector2dc vector2dc, Vector2d vector2d)
      Specified by:
      add in interface Vector2dc
    • add

      public Vector2d add​(Vector2fc vector2fc, Vector2d vector2d)
      Specified by:
      add in interface Vector2dc
    • zero

      public Vector2d 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 Vector2d negate()
    • negate

      public Vector2d negate​(Vector2d vector2d)
      Specified by:
      negate in interface Vector2dc
    • lerp

      public Vector2d lerp​(Vector2dc vector2dc, double double1)
    • lerp

      public Vector2d lerp​(Vector2dc vector2dc, double double1, Vector2d vector2d)
      Specified by:
      lerp in interface Vector2dc
    • 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)
    • fma

      public Vector2d fma​(Vector2dc vector2dc, Vector2dc vector2dc2)
    • fma

      public Vector2d fma​(double double1, Vector2dc vector2dc)
    • fma

      public Vector2d fma​(Vector2dc vector2dc, Vector2dc vector2dc2, Vector2d vector2d)
      Specified by:
      fma in interface Vector2dc
    • fma

      public Vector2d fma​(double double1, Vector2dc vector2dc, Vector2d vector2d)
      Specified by:
      fma in interface Vector2dc
    • toImmutable

      public Vector2dc toImmutable()