- java.lang.Object
-
- org.spongepowered.math.vector.Vector4f
-
- All Implemented Interfaces:
Serializable
,Comparable<Vector4f>
,Vectorf
@Immutable public final class Vector4f extends Object implements Vectorf, Comparable<Vector4f>, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Vector4f(double x, double y, double z, double w)
Vector4f(float x, float y, float z, float w)
Vector4f(Vector2f v)
Vector4f(Vector2f v, double z, double w)
Vector4f(Vector2f v, float z, float w)
Vector4f(Vector3f v)
Vector4f(Vector3f v, double w)
Vector4f(Vector3f v, float w)
Vector4f(VectorNf v)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector4f
abs()
Vector4f
add(double x, double y, double z, double w)
Vector4f
add(float x, float y, float z, float w)
Vector4f
add(Vector4f v)
Vector4f
ceil()
int
compareTo(Vector4f v)
float
distance(double x, double y, double z, double w)
float
distance(float x, float y, float z, float w)
float
distance(Vector4f v)
float
distanceSquared(double x, double y, double z, double w)
float
distanceSquared(float x, float y, float z, float w)
float
distanceSquared(Vector4f v)
Vector4f
div(double a)
Vector4f
div(double x, double y, double z, double w)
Vector4f
div(float a)
Vector4f
div(float x, float y, float z, float w)
Vector4f
div(Vector4f v)
float
dot(double x, double y, double z, double w)
float
dot(float x, float y, float z, float w)
float
dot(Vector4f v)
boolean
equals(Object other)
Vector4f
floor()
int
floorW()
int
floorX()
int
floorY()
int
floorZ()
static Vector4f
from(float n)
static Vector4f
from(float x, float y, float z, float w)
int
hashCode()
float
length()
float
lengthSquared()
Vector4f
max(double x, double y, double z, double w)
Vector4f
max(float x, float y, float z, float w)
Vector4f
max(Vector4f v)
int
maxAxis()
Return the axis with the maximum value.Vector4f
min(double x, double y, double z, double w)
Vector4f
min(float x, float y, float z, float w)
Vector4f
min(Vector4f v)
int
minAxis()
Return the axis with the minimal value.Vector4f
mul(double a)
Vector4f
mul(double x, double y, double z, double w)
Vector4f
mul(float a)
Vector4f
mul(float x, float y, float z, float w)
Vector4f
mul(Vector4f v)
Vector4f
negate()
Vector4f
normalize()
Vector4f
pow(double pow)
Vector4f
pow(float power)
Vector4f
project(double x, double y, double z, double w)
Vector4f
project(float x, float y, float z, float w)
Vector4f
project(Vector4f v)
Vector4f
round()
Vector4f
sub(double x, double y, double z, double w)
Vector4f
sub(float x, float y, float z, float w)
Vector4f
sub(Vector4f v)
float[]
toArray()
Vector4d
toDouble()
Vector4f
toFloat()
Vector4i
toInt()
Vector4l
toLong()
String
toString()
Vector2f
toVector2()
Vector3f
toVector3()
VectorNf
toVectorN()
float
w()
float
x()
float
y()
float
z()
-
-
-
Constructor Detail
-
Vector4f
public Vector4f(Vector2f v)
-
Vector4f
public Vector4f(Vector2f v, double z, double w)
-
Vector4f
public Vector4f(Vector2f v, float z, float w)
-
Vector4f
public Vector4f(Vector3f v)
-
Vector4f
public Vector4f(Vector3f v, double w)
-
Vector4f
public Vector4f(Vector3f v, float w)
-
Vector4f
public Vector4f(VectorNf v)
-
Vector4f
public Vector4f(double x, double y, double z, double w)
-
Vector4f
public Vector4f(float x, float y, float z, float w)
-
-
Method Detail
-
x
public float x()
-
y
public float y()
-
z
public float z()
-
w
public float w()
-
floorX
public int floorX()
-
floorY
public int floorY()
-
floorZ
public int floorZ()
-
floorW
public int floorW()
-
add
public Vector4f add(double x, double y, double z, double w)
-
add
public Vector4f add(float x, float y, float z, float w)
-
sub
public Vector4f sub(double x, double y, double z, double w)
-
sub
public Vector4f sub(float x, float y, float z, float w)
-
mul
public Vector4f mul(double a)
-
mul
public Vector4f mul(double x, double y, double z, double w)
-
mul
public Vector4f mul(float x, float y, float z, float w)
-
div
public Vector4f div(double a)
-
div
public Vector4f div(double x, double y, double z, double w)
-
div
public Vector4f div(float x, float y, float z, float w)
-
dot
public float dot(Vector4f v)
-
dot
public float dot(double x, double y, double z, double w)
-
dot
public float dot(float x, float y, float z, float w)
-
project
public Vector4f project(double x, double y, double z, double w)
-
project
public Vector4f project(float x, float y, float z, float w)
-
pow
public Vector4f pow(double pow)
-
min
public Vector4f min(double x, double y, double z, double w)
-
min
public Vector4f min(float x, float y, float z, float w)
-
max
public Vector4f max(double x, double y, double z, double w)
-
max
public Vector4f max(float x, float y, float z, float w)
-
distanceSquared
public float distanceSquared(Vector4f v)
-
distanceSquared
public float distanceSquared(double x, double y, double z, double w)
-
distanceSquared
public float distanceSquared(float x, float y, float z, float w)
-
distance
public float distance(Vector4f v)
-
distance
public float distance(double x, double y, double z, double w)
-
distance
public float distance(float x, float y, float z, float w)
-
lengthSquared
public float lengthSquared()
- Specified by:
lengthSquared
in interfaceVectorf
-
minAxis
public int minAxis()
Return the axis with the minimal value.
-
maxAxis
public int maxAxis()
Return the axis with the maximum value.
-
toVector2
public Vector2f toVector2()
-
toVector3
public Vector3f toVector3()
-
toVectorN
public VectorNf toVectorN()
-
compareTo
public int compareTo(Vector4f v)
- Specified by:
compareTo
in interfaceComparable<Vector4f>
-
from
public static Vector4f from(float n)
-
from
public static Vector4f from(float x, float y, float z, float w)
-
-