- 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 Vector4fabs()Vector4fadd(double x, double y, double z, double w)Vector4fadd(float x, float y, float z, float w)Vector4fadd(Vector4f v)Vector4fceil()intcompareTo(Vector4f v)floatdistance(double x, double y, double z, double w)floatdistance(float x, float y, float z, float w)floatdistance(Vector4f v)floatdistanceSquared(double x, double y, double z, double w)floatdistanceSquared(float x, float y, float z, float w)floatdistanceSquared(Vector4f v)Vector4fdiv(double a)Vector4fdiv(double x, double y, double z, double w)Vector4fdiv(float a)Vector4fdiv(float x, float y, float z, float w)Vector4fdiv(Vector4f v)floatdot(double x, double y, double z, double w)floatdot(float x, float y, float z, float w)floatdot(Vector4f v)booleanequals(Object other)Vector4ffloor()intfloorW()intfloorX()intfloorY()intfloorZ()static Vector4ffrom(float n)static Vector4ffrom(float x, float y, float z, float w)inthashCode()floatlength()floatlengthSquared()Vector4fmax(double x, double y, double z, double w)Vector4fmax(float x, float y, float z, float w)Vector4fmax(Vector4f v)intmaxAxis()Return the axis with the maximum value.Vector4fmin(double x, double y, double z, double w)Vector4fmin(float x, float y, float z, float w)Vector4fmin(Vector4f v)intminAxis()Return the axis with the minimal value.Vector4fmul(double a)Vector4fmul(double x, double y, double z, double w)Vector4fmul(float a)Vector4fmul(float x, float y, float z, float w)Vector4fmul(Vector4f v)Vector4fnegate()Vector4fnormalize()Vector4fpow(double pow)Vector4fpow(float power)Vector4fproject(double x, double y, double z, double w)Vector4fproject(float x, float y, float z, float w)Vector4fproject(Vector4f v)Vector4fround()Vector4fsub(double x, double y, double z, double w)Vector4fsub(float x, float y, float z, float w)Vector4fsub(Vector4f v)float[]toArray()Vector4dtoDouble()Vector4ftoFloat()Vector4itoInt()Vector4ltoLong()StringtoString()Vector2ftoVector2()Vector3ftoVector3()VectorNftoVectorN()floatw()floatx()floaty()floatz()
-
-
-
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:
lengthSquaredin 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:
compareToin interfaceComparable<Vector4f>
-
from
public static Vector4f from(float n)
-
from
public static Vector4f from(float x, float y, float z, float w)
-
-