2019-06-22 19:02:17 +00:00
|
|
|
package net.shadowfacts.cacao.geometry
|
2019-06-22 18:59:37 +00:00
|
|
|
|
|
|
|
/**
|
2019-06-22 20:08:00 +00:00
|
|
|
* An axis in a 2D coordinate plane.
|
|
|
|
*
|
2019-06-22 18:59:37 +00:00
|
|
|
* @author shadowfacts
|
|
|
|
*/
|
|
|
|
enum class Axis {
|
|
|
|
HORIZONTAL, VERTICAL;
|
|
|
|
|
2019-06-22 20:08:00 +00:00
|
|
|
/**
|
|
|
|
* Gets the axis that is perpendicular to this one.
|
|
|
|
*/
|
|
|
|
val perpendicular: Axis
|
2019-06-22 18:59:37 +00:00
|
|
|
get() = when (this) {
|
|
|
|
HORIZONTAL -> VERTICAL
|
|
|
|
VERTICAL -> HORIZONTAL
|
|
|
|
}
|
|
|
|
}
|