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[] floatArray)
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)
Vector2f(Vector2ic vector2ic)
-
Method Summary
Modifier and Type Method Description Vector2f
absolute()
Vector2f
absolute(Vector2f vector2f)
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)
Vector2f
ceil()
Vector2f
ceil(Vector2f vector2f)
float
distance(float float1, float float2)
static float
distance(float float1, float float2, float float3, float float4)
float
distance(Vector2fc vector2fc)
float
distanceSquared(float float1, float float2)
static float
distanceSquared(float float1, float float2, float float3, float float4)
float
distanceSquared(Vector2fc vector2fc)
Vector2f
div(float float1)
Vector2f
div(float float1, float float2)
Vector2f
div(float float1, float float2, Vector2f vector2f)
Vector2f
div(float float1, Vector2f vector2f)
Vector2f
div(Vector2fc vector2fc)
Vector2f
div(Vector2fc vector2fc, Vector2f vector2f)
float
dot(Vector2fc vector2fc)
boolean
equals(float float1, float float2)
boolean
equals(java.lang.Object object)
boolean
equals(Vector2fc vector2fc, float float1)
Vector2f
floor()
Vector2f
floor(Vector2f vector2f)
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)
float
get(int int1)
java.nio.ByteBuffer
get(int int1, java.nio.ByteBuffer byteBuffer)
java.nio.FloatBuffer
get(int int1, java.nio.FloatBuffer floatBuffer)
Vector2i
get(int int1, Vector2i vector2i)
java.nio.ByteBuffer
get(java.nio.ByteBuffer byteBuffer)
java.nio.FloatBuffer
get(java.nio.FloatBuffer floatBuffer)
Vector2d
get(Vector2d vector2d)
Vector2f
get(Vector2f vector2f)
Vector2fc
getToAddress(long long1)
int
hashCode()
boolean
isFinite()
float
length()
static float
length(float float1, float float2)
float
lengthSquared()
static float
lengthSquared(float float1, float float2)
Vector2f
lerp(Vector2fc vector2fc, float float1)
Vector2f
lerp(Vector2fc vector2fc, float float1, Vector2f vector2f)
Vector2f
max(Vector2fc vector2fc)
Vector2f
max(Vector2fc vector2fc, Vector2f vector2f)
int
maxComponent()
Vector2f
min(Vector2fc vector2fc)
Vector2f
min(Vector2fc vector2fc, Vector2f vector2f)
int
minComponent()
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(Matrix2dc matrix2dc)
Vector2f
mul(Matrix2dc matrix2dc, Vector2f vector2f)
Vector2f
mul(Matrix2fc matrix2fc)
Vector2f
mul(Matrix2fc matrix2fc, Vector2f vector2f)
Vector2f
mul(Vector2fc vector2fc)
Vector2f
mul(Vector2fc vector2fc, Vector2f vector2f)
Vector2f
mulDirection(Matrix3x2fc matrix3x2fc)
Vector2f
mulDirection(Matrix3x2fc matrix3x2fc, Vector2f vector2f)
Vector2f
mulPosition(Matrix3x2fc matrix3x2fc)
Vector2f
mulPosition(Matrix3x2fc matrix3x2fc, Vector2f vector2f)
Vector2f
mulTranspose(Matrix2fc matrix2fc)
Vector2f
mulTranspose(Matrix2fc matrix2fc, Vector2f vector2f)
Vector2f
negate()
Vector2f
negate(Vector2f vector2f)
Vector2f
normalize()
Vector2f
normalize(float float1)
Vector2f
normalize(float float1, Vector2f vector2f)
Vector2f
normalize(Vector2f vector2f)
Vector2f
perpendicular()
void
readExternal(java.io.ObjectInput objectInput)
Vector2f
round()
Vector2f
round(Vector2f vector2f)
Vector2f
set(double double1)
Vector2f
set(double double1, double double2)
Vector2f
set(float float1)
Vector2f
set(float[] floatArray)
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
set(Vector2ic vector2ic)
Vector2f
setComponent(int int1, float float1)
Vector2f
setFromAddress(long long1)
Vector2f
sub(float float1, float float2)
Vector2f
sub(float float1, float float2, Vector2f vector2f)
Vector2f
sub(Vector2fc vector2fc)
Vector2f
sub(Vector2fc vector2fc, Vector2f vector2f)
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
-
Vector2f
public Vector2f(float[] floatArray) -
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
-
set
-
set
-
set
-
set
-
setFromAddress
-
get
public float get(int int1) throws java.lang.IllegalArgumentException -
get
-
get
-
get
-
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) -
getToAddress
- Specified by:
getToAddress
in interfaceVector2fc
-
perpendicular
-
sub
-
sub
-
sub
-
sub
-
dot
-
angle
-
lengthSquared
public float lengthSquared()- Specified by:
lengthSquared
in interfaceVector2fc
-
lengthSquared
public static float lengthSquared(float float1, float float2) -
length
public float length() -
length
public static float length(float float1, float float2) -
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
-
distance
public static float distance(float float1, float float2, float float3, float float4) -
distanceSquared
public static float distanceSquared(float float1, float float2, float float3, float float4) -
normalize
-
normalize
-
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
-
div
-
div
-
div
-
div
-
div
-
div
-
mul
-
mul
-
mul
-
mul
-
mulTranspose
-
mulTranspose
- Specified by:
mulTranspose
in interfaceVector2fc
-
mulPosition
-
mulPosition
- Specified by:
mulPosition
in interfaceVector2fc
-
mulDirection
-
mulDirection
- Specified by:
mulDirection
in interfaceVector2fc
-
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
-
equals
-
equals
public boolean equals(float float1, float float2) -
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
-
min
-
min
-
max
-
max
-
maxComponent
public int maxComponent()- Specified by:
maxComponent
in interfaceVector2fc
-
minComponent
public int minComponent()- Specified by:
minComponent
in interfaceVector2fc
-
floor
-
floor
-
ceil
-
ceil
-
round
-
round
-
isFinite
public boolean isFinite() -
absolute
-
absolute
-