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