- 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Vector4d(double x, double y, double z, double w)
Vector4d(float x, float y, float z, float w)
Vector4d(Vector2d v)
Vector4d(Vector2d v, double z, double w)
Vector4d(Vector2d v, float z, float w)
Vector4d(Vector3d v)
Vector4d(Vector3d v, double w)
Vector4d(Vector3d v, float w)
Vector4d(VectorNd v)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector4d
abs()
Vector4d
add(double x, double y, double z, double w)
Vector4d
add(float x, float y, float z, float w)
Vector4d
add(Vector4d v)
Vector4d
ceil()
int
compareTo(Vector4d v)
double
distance(double x, double y, double z, double w)
double
distance(float x, float y, float z, float w)
double
distance(Vector4d v)
double
distanceSquared(double x, double y, double z, double w)
double
distanceSquared(float x, float y, float z, float w)
double
distanceSquared(Vector4d v)
Vector4d
div(double a)
Vector4d
div(double x, double y, double z, double w)
Vector4d
div(float a)
Vector4d
div(float x, float y, float z, float w)
Vector4d
div(Vector4d v)
double
dot(double x, double y, double z, double w)
double
dot(float x, float y, float z, float w)
double
dot(Vector4d v)
boolean
equals(Object other)
Vector4d
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
lengthSquared()
Vector4d
max(double x, double y, double z, double w)
Vector4d
max(float x, float y, float z, float w)
Vector4d
max(Vector4d v)
int
maxAxis()
Return the axis with the maximum value.Vector4d
min(double x, double y, double z, double w)
Vector4d
min(float x, float y, float z, float w)
Vector4d
min(Vector4d v)
int
minAxis()
Return the axis with the minimal value.Vector4d
mul(double a)
Vector4d
mul(double x, double y, double z, double w)
Vector4d
mul(float a)
Vector4d
mul(float x, float y, float z, float w)
Vector4d
mul(Vector4d v)
Vector4d
negate()
Vector4d
normalize()
Vector4d
pow(double power)
Vector4d
pow(float pow)
Vector4d
project(double x, double y, double z, double w)
Vector4d
project(float x, float y, float z, float w)
Vector4d
project(Vector4d v)
Vector4d
round()
Vector4d
sub(double x, double y, double z, double w)
Vector4d
sub(float x, float y, float z, float w)
Vector4d
sub(Vector4d v)
double[]
toArray()
Vector4d
toDouble()
Vector4f
toFloat()
Vector4i
toInt()
Vector4l
toLong()
String
toString()
Vector2d
toVector2()
Vector3d
toVector3()
VectorNd
toVectorN()
double
w()
double
x()
double
y()
double
z()
-
-
-
Constructor Detail
-
Vector4d
public Vector4d(Vector2d v)
-
Vector4d
public Vector4d(Vector2d v, float z, float w)
-
Vector4d
public Vector4d(Vector2d v, double z, double w)
-
Vector4d
public Vector4d(Vector3d v)
-
Vector4d
public Vector4d(Vector3d v, float w)
-
Vector4d
public Vector4d(Vector3d v, double w)
-
Vector4d
public Vector4d(VectorNd v)
-
Vector4d
public Vector4d(float x, float y, float z, float w)
-
Vector4d
public Vector4d(double x, double y, double z, double w)
-
-
Method Detail
-
x
public double x()
-
y
public double y()
-
z
public double z()
-
w
public double w()
-
floorX
public int floorX()
-
floorY
public int floorY()
-
floorZ
public int floorZ()
-
floorW
public int floorW()
-
add
public Vector4d add(float x, float y, float z, float w)
-
add
public Vector4d add(double x, double y, double z, double w)
-
sub
public Vector4d sub(float x, float y, float z, float w)
-
sub
public Vector4d sub(double x, double y, double z, double w)
-
mul
public Vector4d mul(float a)
-
mul
public Vector4d mul(float x, float y, float z, float w)
-
mul
public Vector4d mul(double x, double y, double z, double w)
-
div
public Vector4d div(float a)
-
div
public Vector4d div(float x, float y, float z, float w)
-
div
public Vector4d div(double x, double y, double z, double w)
-
dot
public double dot(Vector4d v)
-
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
public Vector4d project(float x, float y, float z, float w)
-
project
public Vector4d project(double x, double y, double z, double w)
-
pow
public Vector4d pow(float pow)
-
min
public Vector4d min(float x, float y, float z, float w)
-
min
public Vector4d min(double x, double y, double z, double w)
-
max
public Vector4d max(float x, float y, float z, float w)
-
max
public Vector4d max(double x, double y, double z, double w)
-
distanceSquared
public double distanceSquared(Vector4d v)
-
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
public double distance(Vector4d v)
-
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
-
minAxis
public int minAxis()
Return the axis with the minimal value.
-
maxAxis
public int maxAxis()
Return the axis with the maximum value.
-
toVector2
public Vector2d toVector2()
-
toVector3
public Vector3d toVector3()
-
toVectorN
public VectorNd toVectorN()
-
compareTo
public int compareTo(Vector4d v)
- Specified by:
compareTo
in interfaceComparable<Vector4d>
-
from
public static Vector4d from(double n)
-
from
public static Vector4d from(double x, double y, double z, double w)
-
-