Package xyz.calcugames.levelz.coord
Interface Coordinate
- All Superinterfaces:
Comparable<Coordinate>
- All Known Implementing Classes:
Coordinate2D
,Coordinate3D
Represents a Game Coordinate.
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
compareTo
(@NotNull Coordinate o) static Coordinate
fromArray
(int[] coords) Creates a Coordinate from an array of integers.@NotNull Dimension
Gets the dimension of the Coordinate.double
Gets the magnitude of the Coordinate.int
hashCode()
@NotNull String
toString()
-
Method Details
-
getMagnitude
double getMagnitude()Gets the magnitude of the Coordinate.- Returns:
- Coordinate Magnitude
-
getDimension
Gets the dimension of the Coordinate.- Returns:
- Coordinate Dimension
-
toString
-
hashCode
int hashCode() -
fromArray
Creates a Coordinate from an array of integers. -
compareTo
- Specified by:
compareTo
in interfaceComparable<Coordinate>
-