ASMR/src/main/kotlin/net/shadowfacts/cacao/geometry/Point.kt

16 lines
284 B
Kotlin
Raw Normal View History

2019-06-22 19:02:17 +00:00
package net.shadowfacts.cacao.geometry
2019-06-22 14:59:18 +00:00
/**
2019-06-22 20:08:00 +00:00
* Helper class for defining 2D points.
*
2019-06-22 14:59:18 +00:00
* @author shadowfacts
*/
2019-06-22 15:06:39 +00:00
data class Point(val x: Double, val y: Double) {
constructor(x: Int, y: Int): this(x.toDouble(), y.toDouble())
2019-06-23 20:53:25 +00:00
companion object {
val ORIGIN = Point(0.0, 0.0)
}
}