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) intfloatdistance(double x, double y, double z, double w) floatdistance(int x, int y, int z, int w) floatintdistanceSquared(double x, double y, double z, double w) intdistanceSquared(int x, int y, int z, int w) intdiv(double a) div(double x, double y, double z, double w) div(int a) div(int x, int y, int z, int w) intdot(double x, double y, double z, double w) intdot(int x, int y, int z, int w) intbooleanstatic Vector4ifrom(int n) static Vector4ifrom(int x, int y, int z, int w) inthashCode()floatlength()intmax(double x, double y, double z, double w) max(int x, int y, int z, int w) intmaxAxis()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) intminAxis()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()intw()withW(double w) withW(int w) withX(double x) withX(int x) withY(double y) withY(int y) withZ(double z) withZ(int z) intx()inty()intz()
-
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:
lengthSquaredin 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:
compareToin interfaceComparable<Vector4i>
-
equals
-
hashCode
public int hashCode() -
toString
-
from
-
from
-