PhysicalConnectivity/src/main/kotlin/net/shadowfacts/cacao/geometry/Axis.kt

19 lines
322 B
Kotlin
Raw Normal View History

2021-02-19 04:12:43 +00:00
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
}
}