19 lines
322 B
Kotlin
19 lines
322 B
Kotlin
package net.shadowfacts.cacao.geometry
|
|
|
|
/**
|
|
* An axis in a 2D coordinate plane.
|
|
*
|
|
* @author shadowfacts
|
|
*/
|
|
enum class Axis {
|
|
HORIZONTAL, VERTICAL;
|
|
|
|
/**
|
|
* Gets the axis that is perpendicular to this one.
|
|
*/
|
|
val perpendicular: Axis
|
|
get() = when (this) {
|
|
HORIZONTAL -> VERTICAL
|
|
VERTICAL -> HORIZONTAL
|
|
}
|
|
} |