From 45e762eed44018dabe0745bcdead8627b23fefea Mon Sep 17 00:00:00 2001 From: Kornilovich Mikhail Date: Sat, 9 Dec 2023 21:29:43 +0300 Subject: [PATCH] fixed bugs in LocatorPoint --- .../src/main/kotlin/org/icpclive/sniper/LocatorPoint.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/LocatorPoint.kt b/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/LocatorPoint.kt index e8984b103..d0203f28a 100644 --- a/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/LocatorPoint.kt +++ b/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/LocatorPoint.kt @@ -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 {