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 SummaryConstructors Constructor Description Vector2i()Vector2i(int int1)Vector2i(int int1, int int2)Vector2i(int int1, java.nio.ByteBuffer byteBuffer)Vector2i(int int1, java.nio.IntBuffer intBuffer)Vector2i(java.nio.ByteBuffer byteBuffer)Vector2i(java.nio.IntBuffer intBuffer)Vector2i(Vector2ic vector2ic)
- 
Method SummaryModifier and Type Method Description Vector2iadd(int int1, int int2)Vector2iadd(int int1, int int2, Vector2i vector2i)Vector2iadd(Vector2ic vector2ic)Vector2iadd(Vector2ic vector2ic, Vector2i vector2i)doubledistance(int int1, int int2)doubledistance(Vector2ic vector2ic)longdistanceSquared(int int1, int int2)longdistanceSquared(Vector2ic vector2ic)booleanequals(java.lang.Object object)java.nio.ByteBufferget(int int1, java.nio.ByteBuffer byteBuffer)java.nio.IntBufferget(int int1, java.nio.IntBuffer intBuffer)java.nio.ByteBufferget(java.nio.ByteBuffer byteBuffer)java.nio.IntBufferget(java.nio.IntBuffer intBuffer)inthashCode()doublelength()longlengthSquared()Vector2imul(int int1)Vector2imul(int int1, int int2)Vector2imul(int int1, int int2, Vector2i vector2i)Vector2imul(int int1, Vector2i vector2i)Vector2imul(Vector2ic vector2ic)Vector2imul(Vector2ic vector2ic, Vector2i vector2i)Vector2inegate()Vector2inegate(Vector2i vector2i)voidreadExternal(java.io.ObjectInput objectInput)Vector2iset(int int1)Vector2iset(int int1, int int2)Vector2iset(int int1, java.nio.ByteBuffer byteBuffer)Vector2iset(int int1, java.nio.IntBuffer intBuffer)Vector2iset(java.nio.ByteBuffer byteBuffer)Vector2iset(java.nio.IntBuffer intBuffer)Vector2iset(Vector2dc vector2dc)Vector2iset(Vector2ic vector2ic)Vector2isetComponent(int int1, int int2)Vector2isub(int int1, int int2)Vector2isub(int int1, int int2, Vector2i vector2i)Vector2isub(Vector2ic vector2ic)Vector2isub(Vector2ic vector2ic, Vector2i vector2i)Vector2ictoImmutable()java.lang.StringtoString()java.lang.StringtoString(java.text.NumberFormat numberFormat)voidwriteExternal(java.io.ObjectOutput objectOutput)intx()inty()Vector2izero()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
- 
Field Details- 
xpublic int x
- 
ypublic int y
 
- 
- 
Constructor Details- 
Vector2ipublic Vector2i()
- 
Vector2ipublic Vector2i(int int1)
- 
Vector2ipublic Vector2i(int int1, int int2)
- 
Vector2i
- 
Vector2ipublic Vector2i(java.nio.ByteBuffer byteBuffer)
- 
Vector2ipublic Vector2i(int int1, java.nio.ByteBuffer byteBuffer)
- 
Vector2ipublic Vector2i(java.nio.IntBuffer intBuffer)
- 
Vector2ipublic Vector2i(int int1, java.nio.IntBuffer intBuffer)
 
- 
- 
Method Details- 
xpublic int x()
- 
ypublic int y()
- 
set
- 
set
- 
set
- 
set
- 
set
- 
set
- 
set
- 
set
- 
setComponent- Throws:
- java.lang.IllegalArgumentException
 
- 
getpublic java.nio.ByteBuffer get(java.nio.ByteBuffer byteBuffer)
- 
getpublic java.nio.ByteBuffer get(int int1, java.nio.ByteBuffer byteBuffer)
- 
getpublic java.nio.IntBuffer get(java.nio.IntBuffer intBuffer)
- 
getpublic java.nio.IntBuffer get(int int1, java.nio.IntBuffer intBuffer)
- 
sub
- 
sub
- 
sub
- 
sub
- 
lengthSquaredpublic long lengthSquared()- Specified by:
- lengthSquaredin interface- Vector2ic
 
- 
lengthpublic double length()
- 
distance
- 
distancepublic double distance(int int1, int int2)
- 
distanceSquared- Specified by:
- distanceSquaredin interface- Vector2ic
 
- 
distanceSquaredpublic long distanceSquared(int int1, int int2)- Specified by:
- distanceSquaredin interface- Vector2ic
 
- 
add
- 
add
- 
add
- 
add
- 
mul
- 
mul
- 
mul
- 
mul
- 
mul
- 
mul
- 
zero
- 
writeExternalpublic void writeExternal(java.io.ObjectOutput objectOutput) throws java.io.IOException- Specified by:
- writeExternalin interface- java.io.Externalizable
- Throws:
- java.io.IOException
 
- 
readExternalpublic void readExternal(java.io.ObjectInput objectInput) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
- readExternalin interface- java.io.Externalizable
- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
- 
negate
- 
negate
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- java.lang.Object
 
- 
equalspublic boolean equals(java.lang.Object object)- Overrides:
- equalsin class- java.lang.Object
 
- 
toStringpublic java.lang.String toString()- Overrides:
- toStringin class- java.lang.Object
 
- 
toStringpublic java.lang.String toString(java.text.NumberFormat numberFormat)
- 
toImmutable
 
-