mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
payloadutil and unhelpful commit message
This commit is contained in:
@@ -21,6 +21,11 @@ data class Point2d(var x: Double, var y: Double) : Cloneable {
|
||||
this.y = other.y
|
||||
}
|
||||
|
||||
fun setCoerceIn(start: Point2d, endInclusive: Point2d) {
|
||||
x = x.coerceIn(start.x, endInclusive.x)
|
||||
y = y.coerceIn(start.y, endInclusive.y)
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate transform this point, with pivot (0, 0)
|
||||
* @return new Point2d that is rotated
|
||||
|
||||
Reference in New Issue
Block a user