mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
new sunlight and skybox colouring collected from real world measurements (reports TBA)
Former-commit-id: 6abaa1e16d0fd7a71f95bd0265809aad9e34a425 Former-commit-id: bb871bd87072f27b9cc29594f9eed615351df5f8
This commit is contained in:
@@ -49,6 +49,8 @@ class Point2d(var x: Double, var y: Double) : Cloneable {
|
||||
|
||||
fun toVector() = Vector2(x, y)
|
||||
|
||||
fun copy() = Point2d(x, y)
|
||||
|
||||
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