diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-09-24 01:16:31 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 17:16:31 +0200 |
commit | 2eed7efac2dab7ec54043d188d814b17052cebdd (patch) | |
tree | 118428ce5d5ef9b2c463e9fa3b7ecc93e4913daa /src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | |
parent | f71458b10781f366d6220b662dba42abe0aa80b3 (diff) | |
download | skyhanni-2eed7efac2dab7ec54043d188d814b17052cebdd.tar.gz skyhanni-2eed7efac2dab7ec54043d188d814b17052cebdd.tar.bz2 skyhanni-2eed7efac2dab7ec54043d188d814b17052cebdd.zip |
Backend: Replace round and roundToPrecision with roundTo (#1931)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index c0c03b677..156ce82a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -38,7 +38,6 @@ import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzDebug import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -47,6 +46,7 @@ import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText @@ -324,9 +324,9 @@ object SkyHanniDebugsAndTests { fun copyLocation(args: Array<String>) { val location = LocationUtils.playerLocation() - val x = (location.x + 0.001).round(1) - val y = (location.y + 0.001).round(1) - val z = (location.z + 0.001).round(1) + val x = (location.x + 0.001).roundTo(1) + val y = (location.y + 0.001).roundTo(1) + val z = (location.z + 0.001).roundTo(1) if (args.size == 1 && args[0].equals("json", false)) { OSUtils.copyToClipboard("\"$x:$y:$z\"") return @@ -576,7 +576,8 @@ object SkyHanniDebugsAndTests { }.editCopy { this.add( 0, - generateSequence(scale) { it + 0.1 }.take(25).map { Renderable.string(it.round(1).toString()) }.toList(), + generateSequence(scale) { it + 0.1 }.take(25).map { Renderable.string(it.roundTo(1).toString()) } + .toList(), ) } config.debugItemPos.renderRenderables( |