public class BlockVector2D extends Vector2D
Vector2D
that that compares with other instances
using integer components.Modifier and Type | Field and Description |
---|---|
static BlockVector2D |
ONE |
static BlockVector2D |
UNIT_X |
static BlockVector2D |
UNIT_Z |
static BlockVector2D |
ZERO |
Constructor and Description |
---|
BlockVector2D(double x,
double z)
Construct a new instance.
|
BlockVector2D(float x,
float z)
Construct a new instance.
|
BlockVector2D(int x,
int z)
Construct a new instance.
|
BlockVector2D(Vector2D position)
Construct an instance from another instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
BlockVector2D |
toBlockVector2D()
Create a new
BlockVector2D from this vector. |
add, add, add, add, ceil, containedWithin, containedWithinBlock, distance, distanceSq, divide, divide, divide, divide, divide, divide, dot, floor, getBlockX, getBlockZ, getMaximum, getMinimum, getX, getZ, isCollinearWith, length, lengthSq, multiply, multiply, multiply, multiply, multiply, multiply, multiply, normalize, positive, round, setX, setX, setZ, setZ, subtract, subtract, subtract, subtract, toString, toVector, toVector, transform2D
public static final BlockVector2D ZERO
public static final BlockVector2D UNIT_X
public static final BlockVector2D UNIT_Z
public static final BlockVector2D ONE
public BlockVector2D(Vector2D position)
position
- the position to copypublic BlockVector2D(int x, int z)
x
- the X coordinatez
- the Z coordinatepublic BlockVector2D(float x, float z)
x
- the X coordinatez
- the Z coordinatepublic BlockVector2D(double x, double z)
x
- the X coordinatez
- the Z coordinatepublic BlockVector2D toBlockVector2D()
Vector2D
BlockVector2D
from this vector.toBlockVector2D
in class Vector2D
BlockVector2D