public final class Point2dHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
checkIndexWithinBoundaryLimits(int zeroBasedIndex)
Checks if the index is within the boundary limit.
|
static void |
checkPointWithinBoundaryLimits(Point2d point)
Checks if the point is within the boundary limits of the
current
FieldBound (in Ruleset ). |
static Point2d |
createPoint2d(int zeroBasedIndex)
Creates a Point2d based on the index and the current Boundary
set in the Ruleset.
|
static int |
getIndex(Point2d point)
Returns an index based on the point and the boundary.
|
public static int getIndex(Point2d point)
point
- Point2d
public static Point2d createPoint2d(int zeroBasedIndex)
zeroBasedIndex
- zero based index, starts from 0public static void checkPointWithinBoundaryLimits(Point2d point)
FieldBound
(in Ruleset
).point
- any Point2d
within the boundary limitjava.lang.IllegalArgumentException
- if the point is not within the limitspublic static void checkIndexWithinBoundaryLimits(int zeroBasedIndex)
zeroBasedIndex
- zero based index.java.lang.IllegalArgumentException
- if the index is out of the boundary