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 Summary
-
Constructor Summary
Constructors Constructor Description Vector2f()
Vector2f(float float1)
Vector2f(float float1, float float2)
Vector2f(int int1, java.nio.ByteBuffer byteBuffer)
Vector2f(int int1, java.nio.FloatBuffer floatBuffer)
Vector2f(java.nio.ByteBuffer byteBuffer)
Vector2f(java.nio.FloatBuffer floatBuffer)
Vector2f(Vector2fc vector2fc)
-
Method Summary
Modifier and Type Method Description Vector2f
add(float float1, float float2)
Vector2f
add(float float1, float float2, Vector2f vector2f)
Vector2f
add(Vector2fc vector2fc)
Vector2f
add(Vector2fc vector2fc, Vector2f vector2f)
float
angle(Vector2fc vector2fc)
float
distance(float float1, float float2)
float
distance(Vector2fc vector2fc)
float
distanceSquared(float float1, float float2)
float
distanceSquared(Vector2fc vector2fc)
float
dot(Vector2fc vector2fc)
boolean
equals(java.lang.Object object)
Vector2f
fma(float float1, Vector2fc vector2fc)
Vector2f
fma(float float1, Vector2fc vector2fc, Vector2f vector2f)
Vector2f
fma(Vector2fc vector2fc, Vector2fc vector2fc2)
Vector2f
fma(Vector2fc vector2fc, Vector2fc vector2fc2, Vector2f vector2f)
java.nio.ByteBuffer
get(int int1, java.nio.ByteBuffer byteBuffer)
java.nio.FloatBuffer
get(int int1, java.nio.FloatBuffer floatBuffer)
java.nio.ByteBuffer
get(java.nio.ByteBuffer byteBuffer)
java.nio.FloatBuffer
get(java.nio.FloatBuffer floatBuffer)
int
hashCode()
float
length()
float
lengthSquared()
Vector2f
lerp(Vector2fc vector2fc, float float1)
Vector2f
lerp(Vector2fc vector2fc, float float1, Vector2f vector2f)
Vector2f
mul(float float1)
Vector2f
mul(float float1, float float2)
Vector2f
mul(float float1, float float2, Vector2f vector2f)
Vector2f
mul(float float1, Vector2f vector2f)
Vector2f
mul(Vector2fc vector2fc)
Vector2f
mul(Vector2fc vector2fc, Vector2f vector2f)
Vector2f
negate()
Vector2f
negate(Vector2f vector2f)
Vector2f
normalize()
Vector2f
normalize(Vector2f vector2f)
Vector2f
perpendicular()
void
readExternal(java.io.ObjectInput objectInput)
Vector2f
set(float float1)
Vector2f
set(float float1, float float2)
Vector2f
set(int int1, java.nio.ByteBuffer byteBuffer)
Vector2f
set(int int1, java.nio.FloatBuffer floatBuffer)
Vector2f
set(java.nio.ByteBuffer byteBuffer)
Vector2f
set(java.nio.FloatBuffer floatBuffer)
Vector2f
set(Vector2dc vector2dc)
Vector2f
set(Vector2fc vector2fc)
Vector2f
setComponent(int int1, float float1)
Vector2f
sub(float float1, float float2)
Vector2f
sub(float float1, float float2, Vector2f vector2f)
Vector2f
sub(Vector2fc vector2fc)
Vector2f
sub(Vector2fc vector2fc, Vector2f vector2f)
Vector2fc
toImmutable()
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat numberFormat)
void
writeExternal(java.io.ObjectOutput objectOutput)
float
x()
float
y()
Vector2f
zero()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
-
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() -
y
public float y() -
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
setComponent
- Throws:
java.lang.IllegalArgumentException
-
get
public java.nio.ByteBuffer get(java.nio.ByteBuffer byteBuffer) -
get
public java.nio.ByteBuffer get(int int1, java.nio.ByteBuffer byteBuffer) -
get
public java.nio.FloatBuffer get(java.nio.FloatBuffer floatBuffer) -
get
public java.nio.FloatBuffer get(int int1, java.nio.FloatBuffer floatBuffer) -
perpendicular
-
sub
-
sub
-
sub
-
sub
-
dot
-
angle
-
length
public float length() -
lengthSquared
public float lengthSquared()- Specified by:
lengthSquared
in interfaceVector2fc
-
distance
-
distanceSquared
- Specified by:
distanceSquared
in interfaceVector2fc
-
distance
public float distance(float float1, float float2) -
distanceSquared
public float distanceSquared(float float1, float float2)- Specified by:
distanceSquared
in interfaceVector2fc
-
normalize
-
normalize
-
add
-
add
-
add
-
add
-
zero
-
writeExternal
public void writeExternal(java.io.ObjectOutput objectOutput) throws java.io.IOException- Specified by:
writeExternal
in interfacejava.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 interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
negate
-
negate
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
lerp
-
lerp
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.text.NumberFormat numberFormat) -
fma
-
fma
-
fma
-
fma
-
toImmutable
-