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 Vector2iadd(int x, int y)Vector2iadd(int x, int y, Vector2i dest)Vector2iadd(Vector2ic v)Vector2iadd(Vector2ic v, Vector2i dest)doubledistance(int x, int y)doubledistance(Vector2ic v)longdistanceSquared(int x, int y)longdistanceSquared(Vector2ic v)booleanequals(java.lang.Object obj)java.nio.ByteBufferget(int index, java.nio.ByteBuffer buffer)java.nio.IntBufferget(int index, java.nio.IntBuffer buffer)java.nio.ByteBufferget(java.nio.ByteBuffer buffer)java.nio.IntBufferget(java.nio.IntBuffer buffer)inthashCode()doublelength()longlengthSquared()Vector2imul(int scalar)Vector2imul(int x, int y)Vector2imul(int x, int y, Vector2i dest)Vector2imul(int scalar, Vector2i dest)Vector2imul(Vector2ic v)Vector2imul(Vector2ic v, Vector2i dest)Vector2inegate()Vector2inegate(Vector2i dest)voidreadExternal(java.io.ObjectInput in)Vector2iset(int s)Vector2iset(int x, int y)Vector2iset(int index, java.nio.ByteBuffer buffer)Vector2iset(int index, java.nio.IntBuffer buffer)Vector2iset(java.nio.ByteBuffer buffer)Vector2iset(java.nio.IntBuffer buffer)Vector2iset(Vector2dc v)Vector2iset(Vector2ic v)Vector2isetComponent(int component, int value)Vector2isub(int x, int y)Vector2isub(int x, int y, Vector2i dest)Vector2isub(Vector2ic v)Vector2isub(Vector2ic v, Vector2i dest)Vector2ictoImmutable()java.lang.StringtoString()java.lang.StringtoString(java.text.NumberFormat formatter)voidwriteExternal(java.io.ObjectOutput out)intx()inty()Vector2izero()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:
lengthSquaredin interfaceVector2ic
-
length
public double length() -
distance
-
distance
public double distance(int x, int y) -
distanceSquared
- Specified by:
distanceSquaredin interfaceVector2ic
-
distanceSquared
public long distanceSquared(int x, int y)- Specified by:
distanceSquaredin 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:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
negate
-
negate
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.text.NumberFormat formatter) -
toImmutable
-