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