Package com.hypixel.hytale.math.vector
Class Vector2l
java.lang.Object
com.hypixel.hytale.math.vector.Vector2l
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Vector2lstatic final BuilderCodec<Vector2l> static final Vector2l[]static final Vector2lprivate intstatic final Vector2lstatic final Vector2lstatic final Vector2lstatic final Vector2lstatic final Vector2lstatic final Vector2lstatic final Vector2llonglongstatic final Vector2l -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(long x, long y) assign(long v) assign(long[] v) assign(long x, long y) clampLength(long maxLength) clone()longdistanceSquaredTo(long x, long y) longdoubledistanceTo(long x, long y) doublelongdropHash()booleanlonggetX()longgetY()inthashCode()doublelength()static Vector2lstatic Vector2lnegate()scale(double s) scale(long s) setLength(long newLen) voidsetX(long x) voidsetY(long y) longsubtract(long x, long y) toString()
-
Field Details
-
CODEC
-
ZERO
-
UP
-
POS_Y
-
DOWN
-
NEG_Y
-
RIGHT
-
POS_X
-
LEFT
-
NEG_X
-
ALL_ONES
-
DIRECTIONS
-
x
public long x -
y
public long y -
hash
private transient int hash
-
-
Constructor Details
-
Vector2l
public Vector2l() -
Vector2l
-
Vector2l
public Vector2l(long x, long y)
-
-
Method Details
-
getX
public long getX() -
setX
public void setX(long x) -
getY
public long getY() -
setY
public void setY(long y) -
assign
-
assign
-
assign
-
assign
-
add
-
add
-
addScaled
-
subtract
-
subtract
-
negate
-
scale
-
scale
-
scale
-
dot
-
distanceTo
-
distanceTo
public double distanceTo(long x, long y) -
distanceSquaredTo
-
distanceSquaredTo
public long distanceSquaredTo(long x, long y) -
normalize
-
length
public double length() -
squaredLength
public long squaredLength() -
setLength
-
clampLength
-
dropHash
-
clone
-
equals
-
hashCode
public int hashCode() -
toString
-
max
-
min
-