aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 14:11:44 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 14:11:44 +0200
commit30b3c5bfd4100c34eaea5b7dd15efc841a328d29 (patch)
tree494e3fe4d42f81108cf96850af342e1a62943a83 /src/main/java/at/hannibal2/skyhanni/features
parent144f3b57f38bbb0953f5f9d5db8cafaad381256d (diff)
downloadskyhanni-30b3c5bfd4100c34eaea5b7dd15efc841a328d29.tar.gz
skyhanni-30b3c5bfd4100c34eaea5b7dd15efc841a328d29.tar.bz2
skyhanni-30b3c5bfd4100c34eaea5b7dd15efc841a328d29.zip
fixed float and double rounding errors
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rwxr-xr-xsrc/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
index f569a0f21..ee80ab77b 100755
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
@@ -38,8 +38,8 @@ class GardenYawAndPitch {
if (!config.showAlways && System.currentTimeMillis() > lastChange + (config.timeout * 1000)) return
val displayList = listOf(
- "§aYaw: §f${yaw.toDouble().round(config.yawPrecision)}",
- "§aPitch: §f${pitch.toDouble().round(config.pitchPrecision)}",
+ "§aYaw: §f${yaw.round(config.yawPrecision)}",
+ "§aPitch: §f${pitch.round(config.pitchPrecision)}",
)
if (GardenAPI.inGarden()) {
config.pos.renderStrings(displayList, posLabel = "Yaw and Pitch")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
index c4e0cbb26..f09e86164 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
@@ -139,7 +139,7 @@ class ItemAbilityCooldown {
}
}
if (event.soundName == "random.drink") {
- if (event.pitch.round(1) == 1.8 && event.volume == 1.0f) {
+ if (event.pitch.round(1) == 1.8f && event.volume == 1.0f) {
ItemAbility.HOLY_ICE.sound()
}
}