From f221b83d186f50f49ed079764b4f9d871aef2bd2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 7 Aug 2023 14:00:29 +0200 Subject: Hide crystal hollows area names below the nucleus --- src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt | 2 +- src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt index 9fcba58f5..70ac2a3e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt @@ -14,7 +14,7 @@ object LocationUtils { fun LorenzVec.distanceToPlayer() = distance(playerLocation()) - fun LorenzVec.distanceToPlayerIgnoreYSq() = distanceIgnoreYSq(playerLocation()) + fun LorenzVec.distanceToPlayerSqIgnoreY() = distanceSqIgnoreY(playerLocation()) fun Entity.distanceToPlayer() = getLorenzVec().distance(playerLocation()) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt index 5f719da63..06d1f8c4a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt @@ -23,7 +23,7 @@ data class LorenzVec( fun toVec3(): Vec3 = Vec3(x, y, z) - fun distanceIgnoreY(other: LorenzVec): Double = distanceIgnoreYSq(other).pow(0.5) + fun distanceIgnoreY(other: LorenzVec): Double = distanceSqIgnoreY(other).pow(0.5) fun distance(other: LorenzVec): Double = distanceSq(other).pow(0.5) @@ -38,7 +38,7 @@ data class LorenzVec( return (dx * dx + dy * dy + dz * dz) } - fun distanceIgnoreYSq(other: LorenzVec): Double { + fun distanceSqIgnoreY(other: LorenzVec): Double { val dx = (other.x - x) val dz = (other.z - z) return (dx * dx + dz * dz) -- cgit