Package org.joml
Class Vector2d
java.lang.Object
org.joml.Vector2d
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,Vector2dc
- Direct Known Subclasses:
MapProjection.ProjectedMeters
public class Vector2d extends java.lang.Object implements java.io.Externalizable, Vector2dc
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Vector2d()
Vector2d(double double1)
Vector2d(double[] doubleArray)
Vector2d(double double1, double double2)
Vector2d(float[] floatArray)
Vector2d(int int1, java.nio.ByteBuffer byteBuffer)
Vector2d(int int1, java.nio.DoubleBuffer doubleBuffer)
Vector2d(java.nio.ByteBuffer byteBuffer)
Vector2d(java.nio.DoubleBuffer doubleBuffer)
Vector2d(Vector2dc vector2dc)
Vector2d(Vector2fc vector2fc)
Vector2d(Vector2ic vector2ic)
-
Method Summary
Modifier and Type Method Description Vector2d
absolute()
Vector2d
absolute(Vector2d vector2d)
Vector2d
add(double double1, double double2)
Vector2d
add(double double1, double double2, Vector2d vector2d)
Vector2d
add(Vector2dc vector2dc)
Vector2d
add(Vector2dc vector2dc, Vector2d vector2d)
Vector2d
add(Vector2fc vector2fc)
Vector2d
add(Vector2fc vector2fc, Vector2d vector2d)
double
angle(Vector2dc vector2dc)
Vector2d
ceil()
Vector2d
ceil(Vector2d vector2d)
double
distance(double double1, double double2)
static double
distance(double double1, double double2, double double3, double double4)
double
distance(Vector2dc vector2dc)
double
distance(Vector2fc vector2fc)
double
distanceSquared(double double1, double double2)
static double
distanceSquared(double double1, double double2, double double3, double double4)
double
distanceSquared(Vector2dc vector2dc)
double
distanceSquared(Vector2fc vector2fc)
Vector2d
div(double double1)
Vector2d
div(double double1, double double2)
Vector2d
div(double double1, double double2, Vector2d vector2d)
Vector2d
div(double double1, Vector2d vector2d)
Vector2d
div(Vector2d vector2d)
Vector2d
div(Vector2dc vector2dc, Vector2d vector2d)
Vector2d
div(Vector2fc vector2fc)
Vector2d
div(Vector2fc vector2fc, Vector2d vector2d)
double
dot(Vector2dc vector2dc)
boolean
equals(double double1, double double2)
boolean
equals(java.lang.Object object)
boolean
equals(Vector2dc vector2dc, double double1)
Vector2d
floor()
Vector2d
floor(Vector2d vector2d)
Vector2d
fma(double double1, Vector2dc vector2dc)
Vector2d
fma(double double1, Vector2dc vector2dc, Vector2d vector2d)
Vector2d
fma(Vector2dc vector2dc, Vector2dc vector2dc2)
Vector2d
fma(Vector2dc vector2dc, Vector2dc vector2dc2, Vector2d vector2d)
double
get(int int1)
java.nio.ByteBuffer
get(int int1, java.nio.ByteBuffer byteBuffer)
java.nio.DoubleBuffer
get(int int1, java.nio.DoubleBuffer doubleBuffer)
Vector2i
get(int int1, Vector2i vector2i)
java.nio.ByteBuffer
get(java.nio.ByteBuffer byteBuffer)
java.nio.DoubleBuffer
get(java.nio.DoubleBuffer doubleBuffer)
Vector2d
get(Vector2d vector2d)
Vector2f
get(Vector2f vector2f)
Vector2dc
getToAddress(long long1)
int
hashCode()
boolean
isFinite()
double
length()
static double
length(double double1, double double2)
double
lengthSquared()
static double
lengthSquared(double double1, double double2)
Vector2d
lerp(Vector2dc vector2dc, double double1)
Vector2d
lerp(Vector2dc vector2dc, double double1, Vector2d vector2d)
Vector2d
max(Vector2dc vector2dc)
Vector2d
max(Vector2dc vector2dc, Vector2d vector2d)
int
maxComponent()
Vector2d
min(Vector2dc vector2dc)
Vector2d
min(Vector2dc vector2dc, Vector2d vector2d)
int
minComponent()
Vector2d
mul(double double1)
Vector2d
mul(double double1, double double2)
Vector2d
mul(double double1, double double2, Vector2d vector2d)
Vector2d
mul(double double1, Vector2d vector2d)
Vector2d
mul(Matrix2dc matrix2dc)
Vector2d
mul(Matrix2dc matrix2dc, Vector2d vector2d)
Vector2d
mul(Matrix2fc matrix2fc)
Vector2d
mul(Matrix2fc matrix2fc, Vector2d vector2d)
Vector2d
mul(Vector2dc vector2dc)
Vector2d
mul(Vector2dc vector2dc, Vector2d vector2d)
Vector2d
mulDirection(Matrix3x2dc matrix3x2dc)
Vector2d
mulDirection(Matrix3x2dc matrix3x2dc, Vector2d vector2d)
Vector2d
mulPosition(Matrix3x2dc matrix3x2dc)
Vector2d
mulPosition(Matrix3x2dc matrix3x2dc, Vector2d vector2d)
Vector2d
mulTranspose(Matrix2dc matrix2dc)
Vector2d
mulTranspose(Matrix2dc matrix2dc, Vector2d vector2d)
Vector2d
mulTranspose(Matrix2fc matrix2fc)
Vector2d
mulTranspose(Matrix2fc matrix2fc, Vector2d vector2d)
Vector2d
negate()
Vector2d
negate(Vector2d vector2d)
Vector2d
normalize()
Vector2d
normalize(double double1)
Vector2d
normalize(double double1, Vector2d vector2d)
Vector2d
normalize(Vector2d vector2d)
Vector2d
perpendicular()
void
readExternal(java.io.ObjectInput objectInput)
Vector2d
round()
Vector2d
round(Vector2d vector2d)
Vector2d
set(double double1)
Vector2d
set(double[] doubleArray)
Vector2d
set(double double1, double double2)
Vector2d
set(float[] floatArray)
Vector2d
set(int int1, java.nio.ByteBuffer byteBuffer)
Vector2d
set(int int1, java.nio.DoubleBuffer doubleBuffer)
Vector2d
set(java.nio.ByteBuffer byteBuffer)
Vector2d
set(java.nio.DoubleBuffer doubleBuffer)
Vector2d
set(Vector2dc vector2dc)
Vector2d
set(Vector2fc vector2fc)
Vector2d
set(Vector2ic vector2ic)
Vector2d
setComponent(int int1, double double1)
Vector2d
setFromAddress(long long1)
Vector2d
sub(double double1, double double2)
Vector2d
sub(double double1, double double2, Vector2d vector2d)
Vector2d
sub(Vector2dc vector2dc)
Vector2d
sub(Vector2dc vector2dc, Vector2d vector2d)
Vector2d
sub(Vector2fc vector2fc)
Vector2d
sub(Vector2fc vector2fc, Vector2d vector2d)
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat numberFormat)
void
writeExternal(java.io.ObjectOutput objectOutput)
double
x()
double
y()
Vector2d
zero()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
-
Vector2d
-
Vector2d
-
Vector2d
public Vector2d(double[] doubleArray) -
Vector2d
public Vector2d(float[] floatArray) -
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() -
y
public double y() -
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
setFromAddress
-
get
public double 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.DoubleBuffer get(java.nio.DoubleBuffer doubleBuffer) -
get
public java.nio.DoubleBuffer get(int int1, java.nio.DoubleBuffer doubleBuffer) -
getToAddress
- Specified by:
getToAddress
in interfaceVector2dc
-
perpendicular
-
sub
-
sub
-
sub
-
sub
-
sub
-
sub
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
div
-
div
-
div
-
div
-
div
-
mul
-
mul
-
mul
-
mul
-
mulTranspose
-
mulTranspose
- Specified by:
mulTranspose
in interfaceVector2dc
-
mulTranspose
-
mulTranspose
- Specified by:
mulTranspose
in interfaceVector2dc
-
mulPosition
-
mulPosition
- Specified by:
mulPosition
in interfaceVector2dc
-
mulDirection
-
mulDirection
- Specified by:
mulDirection
in interfaceVector2dc
-
dot
-
angle
-
lengthSquared
public double lengthSquared()- Specified by:
lengthSquared
in interfaceVector2dc
-
lengthSquared
public static double lengthSquared(double double1, double double2) -
length
public double length() -
length
public static double length(double double1, double double2) -
distance
-
distanceSquared
- Specified by:
distanceSquared
in interfaceVector2dc
-
distance
-
distanceSquared
- Specified by:
distanceSquared
in interfaceVector2dc
-
distance
public double distance(double double1, double double2) -
distanceSquared
public double distanceSquared(double double1, double double2)- Specified by:
distanceSquared
in interfaceVector2dc
-
distance
public static double distance(double double1, double double2, double double3, double double4) -
distanceSquared
public static double distanceSquared(double double1, double double2, double double3, double double4) -
normalize
-
normalize
-
normalize
-
normalize
-
add
-
add
-
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
-
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(double double1, double double2) -
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 interfaceVector2dc
-
minComponent
public int minComponent()- Specified by:
minComponent
in interfaceVector2dc
-
floor
-
floor
-
ceil
-
ceil
-
round
-
round
-
isFinite
public boolean isFinite() -
absolute
-
absolute
-