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