java.lang.Object
org.spongepowered.math.vector.Vector3i
- All Implemented Interfaces:
Serializable
,Comparable<Vector3i>
,Vectori
@Immutable
public final class Vector3i
extends Object
implements Vectori, Comparable<Vector3i>, Serializable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabs()
add
(double x, double y, double z) add
(int x, int y, int z) int
cross
(double x, double y, double z) cross
(int x, int y, int z) float
distance
(double x, double y, double z) float
distance
(int x, int y, int z) float
int
distanceSquared
(double x, double y, double z) int
distanceSquared
(int x, int y, int z) int
div
(double a) div
(double x, double y, double z) div
(int a) div
(int x, int y, int z) int
dot
(double x, double y, double z) int
dot
(int x, int y, int z) int
boolean
static Vector3i
from
(int n) static Vector3i
from
(int x, int y, int z) int
hashCode()
float
length()
int
max
(double x, double y, double z) max
(int x, int y, int z) int
maxAxis()
Returns the axis with the maximum value.min
(double x, double y, double z) min
(int x, int y, int z) int
minAxis()
Returns the axis with the minimal value.mul
(double a) mul
(double x, double y, double z) mul
(int a) mul
(int x, int y, int z) negate()
pow
(double pow) pow
(int power) project
(double x, double y, double z) project
(int x, int y, int z) sub
(double x, double y, double z) sub
(int x, int y, int z) int[]
toArray()
toDouble()
toFloat()
toInt()
toLong()
toString()
toVector2
(boolean useZ) toVector4
(double w) toVector4
(int w) withX
(double x) withX
(int x) withY
(double y) withY
(int y) withZ
(double z) withZ
(int z) int
x()
int
y()
int
z()
-
Field Details
-
ZERO
-
UNIT_X
-
UNIT_Y
-
UNIT_Z
-
ONE
-
RIGHT
-
UP
-
FORWARD
-
-
Constructor Details
-
Vector3i
-
Vector3i
-
Vector3i
-
Vector3i
-
Vector3i
-
Vector3i
public Vector3i(double x, double y, double z) -
Vector3i
public Vector3i(int x, int y, int z)
-
-
Method Details
-
x
public int x() -
withX
-
withX
-
y
public int y() -
withY
-
withY
-
z
public int z() -
withZ
-
withZ
-
add
-
add
-
add
-
sub
-
sub
-
sub
-
mul
-
mul
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
div
-
div
-
dot
-
dot
public int dot(double x, double y, double z) -
dot
public int dot(int x, int y, int z) -
project
-
project
-
project
-
cross
-
cross
-
cross
-
pow
-
pow
-
abs
-
negate
-
min
-
min
-
min
-
max
-
max
-
max
-
distanceSquared
-
distanceSquared
public int distanceSquared(double x, double y, double z) -
distanceSquared
public int distanceSquared(int x, int y, int z) -
distance
-
distance
public float distance(double x, double y, double z) -
distance
public float distance(int x, int y, int z) -
lengthSquared
public int lengthSquared()- Specified by:
lengthSquared
in interfaceVectori
-
length
public float length() -
minAxis
public int minAxis()Returns the axis with the minimal value. -
maxAxis
public int maxAxis()Returns the axis with the maximum value. -
toVector2
-
toVector2
-
toVector4
-
toVector4
-
toVector4
-
toVectorN
-
toArray
public int[] toArray() -
toInt
-
toLong
-
toFloat
-
toDouble
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Vector3i>
-
equals
-
hashCode
public int hashCode() -
toString
-
from
-
from
-