aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-24 13:25:18 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-24 13:25:18 +0200
commit450a0a003d687ae16448734ebef25acfb17cdde4 (patch)
tree352f4e8965e6ae0da3596efcdc57f73b8461d495 /src/main/java/at/hannibal2/skyhanni/utils
parent0b8066fcd9c3318723a29ffadeb7e2fbfeb0250e (diff)
downloadskyhanni-450a0a003d687ae16448734ebef25acfb17cdde4.tar.gz
skyhanni-450a0a003d687ae16448734ebef25acfb17cdde4.tar.bz2
skyhanni-450a0a003d687ae16448734ebef25acfb17cdde4.zip
Fixed irrelevant spelling stuff
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt2
3 files changed, 3 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt
index b34a5ca4b..6db35d2af 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt
@@ -46,7 +46,7 @@ object NumberUtil {
//Long.MIN_VALUE == -Long.MIN_VALUE so we need an adjustment here
if (value == Long.MIN_VALUE) return format(Long.MIN_VALUE + 1)
if (value < 0) return "-" + format(-value)
- if (value < 1000) return value.toString() //deal with easy case
+ if (value < 1000) return value.toString() //deal with small numbers
val (divideBy, suffix) = suffixes.floorEntry(value)
val truncated = value / (divideBy / 10) //the number part of the output times 10
val truncatedAt = if (suffix == "M") 1000 else 100
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index a6efd2355..c72e1f40e 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -404,7 +404,7 @@ object RenderUtils {
pos.z - player.lastTickPosZ + (pos.z - player.posZ - (pos.z - player.lastTickPosZ)) * partialTicks
- //7 - 25
+ //7 – 25
val translate = LorenzVec(x, y, z)
val length = translate.length().toFloat()
@@ -413,19 +413,13 @@ object RenderUtils {
var factor = 1f
var finalScale = scale
if (debug) {
-// if (tick++ % 60 == 0) {
finalText = "$text ${length.toInt()}"
-// println("translate: $length")
-// }
if (length < 8) {
factor = 8 / length
-// translate = translate.multiply(8 / length)
}
if (length > 15) {
factor = 15 / length
-// translate = translate.multiply(15 / length)
}
-// val finalScale = scale * (1 / factor)
finalScale = scale * sqrt(factor.toDouble()).toFloat()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt
index acd1085ba..036c610bc 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt
@@ -24,7 +24,7 @@ interface Renderable {
&& Utils.getMouseY() in (posY..posY + height) // TODO: adjust for variable height?
/**
- * N.B.: the offset is absolute, not relative to the position and should not be used for rendering
+ * N.B.: the offset is absolute, not relative to the position and shouldn't be used for rendering
* (the GL matrix stack should already be pre transformed)
*/
fun render(posX: Int, posY: Int)