Skip to content

Commit

Permalink
fixed bugs in LocatorPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mond1c committed Dec 9, 2023
1 parent e1f6a02 commit 45e762e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class LocatorPoint(var id: String, var x: Double, var y: Double, var z: Double,
return LocatorPoint(
id, x,
y * cos(a) - z * sin(a),
y * sin(a) + z * cos(a), a
y * sin(a) + z * cos(a), r
)
}

fun distTo(o: LocatorPoint): Double {
return hypot(x - o.x, hypot(y - o.y, z - o.x))
return hypot(x - o.x, hypot(y - o.y, z - o.z))
}

fun dist(): Double {
Expand Down

0 comments on commit 45e762e

Please sign in to comment.