- 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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3l
abs()
Vector3l
add(double x, double y, double z)
Vector3l
add(long x, long y, long z)
Vector3l
add(Vector3l v)
int
compareTo(Vector3l v)
Vector3l
cross(double x, double y, double z)
Vector3l
cross(long x, long y, long z)
Vector3l
cross(Vector3l v)
double
distance(double x, double y, double z)
double
distance(long x, long y, long z)
double
distance(Vector3l v)
long
distanceSquared(double x, double y, double z)
long
distanceSquared(long x, long y, long z)
long
distanceSquared(Vector3l v)
Vector3l
div(double a)
Vector3l
div(double x, double y, double z)
Vector3l
div(long a)
Vector3l
div(long x, long y, long z)
Vector3l
div(Vector3l v)
long
dot(double x, double y, double z)
long
dot(long x, long y, long z)
long
dot(Vector3l v)
boolean
equals(Object other)
static Vector3l
from(long n)
static Vector3l
from(long x, long y, long z)
int
hashCode()
double
length()
long
lengthSquared()
Vector3l
max(double x, double y, double z)
Vector3l
max(long x, long y, long z)
Vector3l
max(Vector3l v)
int
maxAxis()
Returns the axis with the maximum value.Vector3l
min(double x, double y, double z)
Vector3l
min(long x, long y, long z)
Vector3l
min(Vector3l v)
int
minAxis()
Returns the axis with the minimal value.Vector3l
mul(double a)
Vector3l
mul(double x, double y, double z)
Vector3l
mul(long a)
Vector3l
mul(long x, long y, long z)
Vector3l
mul(Vector3l v)
Vector3l
negate()
Vector3l
pow(double pow)
Vector3l
pow(long power)
Vector3l
project(double x, double y, double z)
Vector3l
project(long x, long y, long z)
Vector3l
project(Vector3l v)
Vector3l
sub(double x, double y, double z)
Vector3l
sub(long x, long y, long z)
Vector3l
sub(Vector3l v)
long[]
toArray()
Vector3d
toDouble()
Vector3f
toFloat()
Vector3i
toInt()
Vector3l
toLong()
String
toString()
Vector2l
toVector2()
Vector2l
toVector2(boolean useZ)
Vector4l
toVector4()
Vector4l
toVector4(double w)
Vector4l
toVector4(long w)
VectorNl
toVectorN()
long
x()
long
y()
long
z()
-
-
-
Field Detail
-
ZERO
public static final Vector3l ZERO
-
UNIT_X
public static final Vector3l UNIT_X
-
UNIT_Y
public static final Vector3l UNIT_Y
-
UNIT_Z
public static final Vector3l UNIT_Z
-
ONE
public static final Vector3l ONE
-
RIGHT
public static final Vector3l RIGHT
-
UP
public static final Vector3l UP
-
FORWARD
public static final Vector3l FORWARD
-
-
Constructor Detail
-
Vector3l
public Vector3l(Vector2l v)
-
Vector3l
public Vector3l(Vector2l v, double z)
-
Vector3l
public Vector3l(Vector2l v, long z)
-
Vector3l
public Vector3l(Vector4l v)
-
Vector3l
public Vector3l(VectorNl v)
-
Vector3l
public Vector3l(double x, double y, double z)
-
Vector3l
public Vector3l(long x, long y, long z)
-
-
Method Detail
-
x
public long x()
-
y
public long y()
-
z
public long z()
-
add
public Vector3l add(double x, double y, double z)
-
add
public Vector3l add(long x, long y, long z)
-
sub
public Vector3l sub(double x, double y, double z)
-
sub
public Vector3l sub(long x, long y, long z)
-
mul
public Vector3l mul(double a)
-
mul
public Vector3l mul(double x, double y, double z)
-
mul
public Vector3l mul(long x, long y, long z)
-
div
public Vector3l div(double a)
-
div
public Vector3l div(double x, double y, double z)
-
div
public Vector3l div(long x, long y, long z)
-
dot
public long dot(Vector3l v)
-
dot
public long dot(double x, double y, double z)
-
dot
public long dot(long x, long y, long z)
-
project
public Vector3l project(double x, double y, double z)
-
project
public Vector3l project(long x, long y, long z)
-
cross
public Vector3l cross(double x, double y, double z)
-
cross
public Vector3l cross(long x, long y, long z)
-
pow
public Vector3l pow(double pow)
-
min
public Vector3l min(double x, double y, double z)
-
min
public Vector3l min(long x, long y, long z)
-
max
public Vector3l max(double x, double y, double z)
-
max
public Vector3l max(long x, long y, long z)
-
distanceSquared
public long distanceSquared(Vector3l v)
-
distanceSquared
public long distanceSquared(double x, double y, double z)
-
distanceSquared
public long distanceSquared(long x, long y, long z)
-
distance
public double distance(Vector3l v)
-
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
-
minAxis
public int minAxis()
Returns the axis with the minimal value.
-
maxAxis
public int maxAxis()
Returns the axis with the maximum value.
-
toVector2
public Vector2l toVector2()
-
toVector2
public Vector2l toVector2(boolean useZ)
-
toVector4
public Vector4l toVector4()
-
toVector4
public Vector4l toVector4(double w)
-
toVector4
public Vector4l toVector4(long w)
-
toVectorN
public VectorNl toVectorN()
-
compareTo
public int compareTo(Vector3l v)
- Specified by:
compareTo
in interfaceComparable<Vector3l>
-
from
public static Vector3l from(long n)
-
from
public static Vector3l from(long x, long y, long z)
-
-