Package org.joml

Class Vector2f

java.lang.Object
org.joml.Vector2f
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Vector2fc

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

    • x

      public float x
    • y

      public float y
  • Constructor Details

    • Vector2f

      public Vector2f()
    • Vector2f

      public Vector2f​(float float1)
    • Vector2f

      public Vector2f​(float float1, float float2)
    • Vector2f

      public Vector2f​(Vector2fc vector2fc)
    • Vector2f

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

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

      public Vector2f​(java.nio.FloatBuffer floatBuffer)
    • Vector2f

      public Vector2f​(int int1, java.nio.FloatBuffer floatBuffer)
  • Method Details

    • x

      public float x()
      Specified by:
      x in interface Vector2fc
    • y

      public float y()
      Specified by:
      y in interface Vector2fc
    • set

      public Vector2f set​(float float1)
    • set

      public Vector2f set​(float float1, float float2)
    • set

      public Vector2f set​(Vector2fc vector2fc)
    • set

      public Vector2f set​(Vector2dc vector2dc)
    • set

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

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

      public Vector2f set​(java.nio.FloatBuffer floatBuffer)
    • set

      public Vector2f set​(int int1, java.nio.FloatBuffer floatBuffer)
    • setComponent

      public Vector2f setComponent​(int int1, float float1) throws java.lang.IllegalArgumentException
      Throws:
      java.lang.IllegalArgumentException
    • get

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

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

      public java.nio.FloatBuffer get​(java.nio.FloatBuffer floatBuffer)
      Specified by:
      get in interface Vector2fc
    • get

      public java.nio.FloatBuffer get​(int int1, java.nio.FloatBuffer floatBuffer)
      Specified by:
      get in interface Vector2fc
    • perpendicular

      public Vector2f perpendicular()
    • sub

      public Vector2f sub​(Vector2fc vector2fc)
    • sub

      public Vector2f sub​(Vector2fc vector2fc, Vector2f vector2f)
      Specified by:
      sub in interface Vector2fc
    • sub

      public Vector2f sub​(float float1, float float2)
    • sub

      public Vector2f sub​(float float1, float float2, Vector2f vector2f)
      Specified by:
      sub in interface Vector2fc
    • dot

      public float dot​(Vector2fc vector2fc)
      Specified by:
      dot in interface Vector2fc
    • angle

      public float angle​(Vector2fc vector2fc)
      Specified by:
      angle in interface Vector2fc
    • length

      public float length()
      Specified by:
      length in interface Vector2fc
    • lengthSquared

      public float lengthSquared()
      Specified by:
      lengthSquared in interface Vector2fc
    • distance

      public float distance​(Vector2fc vector2fc)
      Specified by:
      distance in interface Vector2fc
    • distanceSquared

      public float distanceSquared​(Vector2fc vector2fc)
      Specified by:
      distanceSquared in interface Vector2fc
    • distance

      public float distance​(float float1, float float2)
      Specified by:
      distance in interface Vector2fc
    • distanceSquared

      public float distanceSquared​(float float1, float float2)
      Specified by:
      distanceSquared in interface Vector2fc
    • normalize

      public Vector2f normalize()
    • normalize

      public Vector2f normalize​(Vector2f vector2f)
      Specified by:
      normalize in interface Vector2fc
    • add

      public Vector2f add​(Vector2fc vector2fc)
    • add

      public Vector2f add​(Vector2fc vector2fc, Vector2f vector2f)
      Specified by:
      add in interface Vector2fc
    • add

      public Vector2f add​(float float1, float float2)
    • add

      public Vector2f add​(float float1, float float2, Vector2f vector2f)
      Specified by:
      add in interface Vector2fc
    • zero

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

      public Vector2f negate​(Vector2f vector2f)
      Specified by:
      negate in interface Vector2fc
    • mul

      public Vector2f mul​(float float1)
    • mul

      public Vector2f mul​(float float1, Vector2f vector2f)
      Specified by:
      mul in interface Vector2fc
    • mul

      public Vector2f mul​(float float1, float float2)
    • mul

      public Vector2f mul​(float float1, float float2, Vector2f vector2f)
      Specified by:
      mul in interface Vector2fc
    • mul

      public Vector2f mul​(Vector2fc vector2fc)
    • mul

      public Vector2f mul​(Vector2fc vector2fc, Vector2f vector2f)
      Specified by:
      mul in interface Vector2fc
    • lerp

      public Vector2f lerp​(Vector2fc vector2fc, float float1)
    • lerp

      public Vector2f lerp​(Vector2fc vector2fc, float float1, Vector2f vector2f)
      Specified by:
      lerp in interface Vector2fc
    • 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 Vector2f fma​(Vector2fc vector2fc, Vector2fc vector2fc2)
    • fma

      public Vector2f fma​(float float1, Vector2fc vector2fc)
    • fma

      public Vector2f fma​(Vector2fc vector2fc, Vector2fc vector2fc2, Vector2f vector2f)
      Specified by:
      fma in interface Vector2fc
    • fma

      public Vector2f fma​(float float1, Vector2fc vector2fc, Vector2f vector2f)
      Specified by:
      fma in interface Vector2fc
    • toImmutable

      public Vector2fc toImmutable()