- java.lang.Object
-
- org.spongepowered.math.vector.Vector2i
-
- All Implemented Interfaces:
Serializable
,Comparable<Vector2i>
,Vectori
@Immutable public final class Vector2i extends Object implements Vectori, Comparable<Vector2i>, Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2i
abs()
Vector2i
add(double x, double y)
Vector2i
add(int x, int y)
Vector2i
add(Vector2i v)
int
compareTo(Vector2i v)
float
distance(double x, double y)
float
distance(int x, int y)
float
distance(Vector2i v)
int
distanceSquared(double x, double y)
int
distanceSquared(int x, int y)
int
distanceSquared(Vector2i v)
Vector2i
div(double a)
Vector2i
div(double x, double y)
Vector2i
div(int a)
Vector2i
div(int x, int y)
Vector2i
div(Vector2i v)
int
dot(double x, double y)
int
dot(int x, int y)
int
dot(Vector2i v)
boolean
equals(Object other)
static Vector2i
from(int n)
static Vector2i
from(int x, int y)
int
hashCode()
float
length()
int
lengthSquared()
Vector2i
max(double x, double y)
Vector2i
max(int x, int y)
Vector2i
max(Vector2i v)
int
maxAxis()
Return the axis with the maximum value.Vector2i
min(double x, double y)
Vector2i
min(int x, int y)
Vector2i
min(Vector2i v)
int
minAxis()
Return the axis with the minimal value.Vector2i
mul(double a)
Vector2i
mul(double x, double y)
Vector2i
mul(int a)
Vector2i
mul(int x, int y)
Vector2i
mul(Vector2i v)
Vector2i
negate()
Vector2i
pow(double pow)
Vector2i
pow(int power)
Vector2i
project(double x, double y)
Vector2i
project(int x, int y)
Vector2i
project(Vector2i v)
Vector2i
sub(double x, double y)
Vector2i
sub(int x, int y)
Vector2i
sub(Vector2i v)
int[]
toArray()
Vector2d
toDouble()
Vector2f
toFloat()
Vector2i
toInt()
Vector2l
toLong()
String
toString()
Vector3i
toVector3()
Vector3i
toVector3(double z)
Vector3i
toVector3(int z)
Vector4i
toVector4()
Vector4i
toVector4(double z, double w)
Vector4i
toVector4(int z, int w)
VectorNi
toVectorN()
int
x()
int
y()
-
-
-
Method Detail
-
x
public int x()
-
y
public int y()
-
add
public Vector2i add(double x, double y)
-
add
public Vector2i add(int x, int y)
-
sub
public Vector2i sub(double x, double y)
-
sub
public Vector2i sub(int x, int y)
-
mul
public Vector2i mul(double a)
-
mul
public Vector2i mul(double x, double y)
-
mul
public Vector2i mul(int x, int y)
-
div
public Vector2i div(double a)
-
div
public Vector2i div(double x, double y)
-
div
public Vector2i div(int x, int y)
-
dot
public int dot(Vector2i v)
-
dot
public int dot(double x, double y)
-
dot
public int dot(int x, int y)
-
project
public Vector2i project(double x, double y)
-
project
public Vector2i project(int x, int y)
-
pow
public Vector2i pow(double pow)
-
min
public Vector2i min(double x, double y)
-
min
public Vector2i min(int x, int y)
-
max
public Vector2i max(double x, double y)
-
max
public Vector2i max(int x, int y)
-
distanceSquared
public int distanceSquared(Vector2i v)
-
distanceSquared
public int distanceSquared(double x, double y)
-
distanceSquared
public int distanceSquared(int x, int y)
-
distance
public float distance(Vector2i v)
-
distance
public float distance(double x, double y)
-
distance
public float distance(int x, int y)
-
lengthSquared
public int lengthSquared()
- Specified by:
lengthSquared
in interfaceVectori
-
minAxis
public int minAxis()
Return the axis with the minimal value.
-
maxAxis
public int maxAxis()
Return the axis with the maximum value.
-
toVector3
public Vector3i toVector3()
-
toVector3
public Vector3i toVector3(double z)
-
toVector3
public Vector3i toVector3(int z)
-
toVector4
public Vector4i toVector4()
-
toVector4
public Vector4i toVector4(double z, double w)
-
toVector4
public Vector4i toVector4(int z, int w)
-
toVectorN
public VectorNi toVectorN()
-
compareTo
public int compareTo(Vector2i v)
- Specified by:
compareTo
in interfaceComparable<Vector2i>
-
from
public static Vector2i from(int n)
-
from
public static Vector2i from(int x, int y)
-
-