mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
AI auto jump test
Former-commit-id: f48972fa48a526e8f697a47cde90b26240f549a3 Former-commit-id: c45dcbcae2f7d85c801ed87c049c403609a6d6d0
This commit is contained in:
@@ -49,5 +49,6 @@ class Point2d(var x: Double, var y: Double) : Cloneable {
|
||||
|
||||
fun toVector() = Vector2(x, y)
|
||||
|
||||
fun length(other: Point2d) = ((this.x - other.x).sqr() + (this.y - other.y).sqr()).sqrt()
|
||||
fun length(other: Point2d) = distSqr(other).sqrt()
|
||||
fun distSqr(other: Point2d) = ((this.x - other.x).sqr() + (this.y - other.y).sqr())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user