Package org.joml
Class Vector2i
java.lang.Object
org.joml.Vector2i
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,Vector2ic
public class Vector2i extends java.lang.Object implements java.io.Externalizable, Vector2ic
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vector2i
add(int x, int y)
Vector2i
add(int x, int y, Vector2i dest)
Vector2i
add(Vector2ic v)
Vector2i
add(Vector2ic v, Vector2i dest)
double
distance(int x, int y)
double
distance(Vector2ic v)
long
distanceSquared(int x, int y)
long
distanceSquared(Vector2ic v)
boolean
equals(java.lang.Object obj)
java.nio.ByteBuffer
get(int index, java.nio.ByteBuffer buffer)
java.nio.IntBuffer
get(int index, java.nio.IntBuffer buffer)
java.nio.ByteBuffer
get(java.nio.ByteBuffer buffer)
java.nio.IntBuffer
get(java.nio.IntBuffer buffer)
int
hashCode()
double
length()
long
lengthSquared()
Vector2i
mul(int scalar)
Vector2i
mul(int x, int y)
Vector2i
mul(int x, int y, Vector2i dest)
Vector2i
mul(int scalar, Vector2i dest)
Vector2i
mul(Vector2ic v)
Vector2i
mul(Vector2ic v, Vector2i dest)
Vector2i
negate()
Vector2i
negate(Vector2i dest)
void
readExternal(java.io.ObjectInput in)
Vector2i
set(int s)
Vector2i
set(int x, int y)
Vector2i
set(int index, java.nio.ByteBuffer buffer)
Vector2i
set(int index, java.nio.IntBuffer buffer)
Vector2i
set(java.nio.ByteBuffer buffer)
Vector2i
set(java.nio.IntBuffer buffer)
Vector2i
set(Vector2dc v)
Vector2i
set(Vector2ic v)
Vector2i
setComponent(int component, int value)
Vector2i
sub(int x, int y)
Vector2i
sub(int x, int y, Vector2i dest)
Vector2i
sub(Vector2ic v)
Vector2i
sub(Vector2ic v, Vector2i dest)
Vector2ic
toImmutable()
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat formatter)
void
writeExternal(java.io.ObjectOutput out)
int
x()
int
y()
Vector2i
zero()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
x
public int x -
y
public int y
-
-
Constructor Details
-
Vector2i
public Vector2i() -
Vector2i
public Vector2i(int s) -
Vector2i
public Vector2i(int x, int y) -
Vector2i
-
Vector2i
public Vector2i(java.nio.ByteBuffer buffer) -
Vector2i
public Vector2i(int index, java.nio.ByteBuffer buffer) -
Vector2i
public Vector2i(java.nio.IntBuffer buffer) -
Vector2i
public Vector2i(int index, java.nio.IntBuffer buffer)
-
-
Method Details
-
x
public int x() -
y
public int y() -
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
setComponent
- Throws:
java.lang.IllegalArgumentException
-
get
public java.nio.ByteBuffer get(java.nio.ByteBuffer buffer) -
get
public java.nio.ByteBuffer get(int index, java.nio.ByteBuffer buffer) -
get
public java.nio.IntBuffer get(java.nio.IntBuffer buffer) -
get
public java.nio.IntBuffer get(int index, java.nio.IntBuffer buffer) -
sub
-
sub
-
sub
-
sub
-
lengthSquared
public long lengthSquared()- Specified by:
lengthSquared
in interfaceVector2ic
-
length
public double length() -
distance
-
distance
public double distance(int x, int y) -
distanceSquared
- Specified by:
distanceSquared
in interfaceVector2ic
-
distanceSquared
public long distanceSquared(int x, int y)- Specified by:
distanceSquared
in interfaceVector2ic
-
add
-
add
-
add
-
add
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
zero
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
negate
-
negate
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- 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 formatter) -
toImmutable
-