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:
-
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
float
distance
(double x, double y, double z, double w) float
distance
(float x, float y, float z, float w) float
float
distanceSquared
(double x, double y, double z, double w) float
distanceSquared
(float x, float y, float z, float w) float
div
(double a) div
(double x, double y, double z, double w) div
(float a) div
(float x, float y, float z, float w) float
dot
(double x, double y, double z, double w) float
dot
(float x, float y, float z, float w) float
boolean
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
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 pow) pow
(float power) 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) float[]
toArray()
toDouble()
toFloat()
toInt()
toLong()
toString()
float
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) float
x()
float
y()
float
z()
-
Field Details
-
ZERO
-
UNIT_X
-
UNIT_Y
-
UNIT_Z
-
UNIT_W
-
ONE
-
-
Constructor Details
-
Vector4f
-
Vector4f
-
Vector4f
-
Vector4f
-
Vector4f
-
Vector4f
-
Vector4f
-
Vector4f
public Vector4f(double x, double y, double z, double w) -
Vector4f
public Vector4f(float x, float y, float z, float w)
-
-
Method Details
-
x
public float x() -
withX
-
withX
-
y
public float y() -
withY
-
withY
-
z
public float z() -
withZ
-
withZ
-
w
public float 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 float dot(double x, double y, double z, double w) -
dot
public float dot(float x, float y, float z, float w) -
project
-
project
-
project
-
pow
-
pow
-
ceil
-
floor
-
round
-
abs
-
negate
-
min
-
min
-
min
-
max
-
max
-
max
-
distanceSquared
-
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
-
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
-
length
public float 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 float[] toArray() -
toInt
-
toLong
-
toFloat
-
toDouble
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Vector4f>
-
equals
-
hashCode
public int hashCode() -
toString
-
from
-
from
-