java.lang.Object
org.spongepowered.math.vector.Vector3l
- All Implemented Interfaces:
Serializable
,Comparable<Vector3l>
,Vectorl
@Immutable
public final class Vector3l
extends Object
implements Vectorl, Comparable<Vector3l>, Serializable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabs()
add
(double x, double y, double z) add
(long x, long y, long z) int
cross
(double x, double y, double z) cross
(long x, long y, long z) double
distance
(double x, double y, double z) double
distance
(long x, long y, long z) double
long
distanceSquared
(double x, double y, double z) long
distanceSquared
(long x, long y, long z) long
div
(double a) div
(double x, double y, double z) div
(long a) div
(long x, long y, long z) long
dot
(double x, double y, double z) long
dot
(long x, long y, long z) long
boolean
static Vector3l
from
(long n) static Vector3l
from
(long x, long y, long z) int
hashCode()
double
length()
long
max
(double x, double y, double z) max
(long x, long y, long z) int
maxAxis()
Returns the axis with the maximum value.min
(double x, double y, double z) min
(long x, long y, long z) int
minAxis()
Returns the axis with the minimal value.mul
(double a) mul
(double x, double y, double z) mul
(long a) mul
(long x, long y, long z) negate()
pow
(double pow) pow
(long power) project
(double x, double y, double z) project
(long x, long y, long z) sub
(double x, double y, double z) sub
(long x, long y, long z) long[]
toArray()
toDouble()
toFloat()
toInt()
toLong()
toString()
toVector2
(boolean useZ) toVector4
(double w) toVector4
(long w) long
x()
long
y()
long
z()
-
Field Details
-
ZERO
-
UNIT_X
-
UNIT_Y
-
UNIT_Z
-
ONE
-
RIGHT
-
UP
-
FORWARD
-
-
Constructor Details
-
Vector3l
-
Vector3l
-
Vector3l
-
Vector3l
-
Vector3l
-
Vector3l
public Vector3l(double x, double y, double z) -
Vector3l
public Vector3l(long x, long y, long z)
-
-
Method Details
-
x
public long x() -
y
public long y() -
z
public long z() -
add
-
add
-
add
-
sub
-
sub
-
sub
-
mul
-
mul
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
div
-
div
-
dot
-
dot
public long dot(double x, double y, double z) -
dot
public long dot(long x, long y, long z) -
project
-
project
-
project
-
cross
-
cross
-
cross
-
pow
-
pow
-
abs
-
negate
-
min
-
min
-
min
-
max
-
max
-
max
-
distanceSquared
-
distanceSquared
public long distanceSquared(double x, double y, double z) -
distanceSquared
public long distanceSquared(long x, long y, long z) -
distance
-
distance
public double distance(double x, double y, double z) -
distance
public double distance(long x, long y, long z) -
lengthSquared
public long lengthSquared()- Specified by:
lengthSquared
in interfaceVectorl
-
length
public double length() -
minAxis
public int minAxis()Returns the axis with the minimal value. -
maxAxis
public int maxAxis()Returns the axis with the maximum value. -
toVector2
-
toVector2
-
toVector4
-
toVector4
-
toVector4
-
toVectorN
-
toArray
public long[] toArray() -
toInt
-
toLong
-
toFloat
-
toDouble
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Vector3l>
-
equals
-
hashCode
public int hashCode() -
toString
-
from
-
from
-