15 lines
316 B
Kotlin
15 lines
316 B
Kotlin
package net.shadowfacts.shadowui.geometry
|
|
|
|
data class UIRect(val left: Double, val top: Double, val width: Double, val height: Double) {
|
|
|
|
val right: Double
|
|
get() = left + width
|
|
val bottom: Double
|
|
get() = top + height
|
|
|
|
val midX: Double
|
|
get() = left + width / 2
|
|
val midY: Double
|
|
get() = top + height / 2
|
|
|
|
} |