From b010bcdd5d4ae7ee50aa45a05d30131bd211f577 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 4 Sep 2022 16:17:06 +0700 Subject: [PATCH] what --- .../kotlin/ru/dbotthepony/mc/otm/core/ImpreciseFraction.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ImpreciseFraction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/ImpreciseFraction.kt index 43b444c56..4b1dabd04 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ImpreciseFraction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/ImpreciseFraction.kt @@ -587,7 +587,7 @@ class ImpreciseFraction @JvmOverloads constructor(whole: BigInteger, decimal: Do */ fun valueOf(value: Int): ImpreciseFraction { if (value in -1024 .. 1024) { - return cache[value + 128] + return cache[value + 1024] } return ImpreciseFraction(value) @@ -598,7 +598,7 @@ class ImpreciseFraction @JvmOverloads constructor(whole: BigInteger, decimal: Do */ fun valueOf(value: Long): ImpreciseFraction { if (value in -1024L .. 1024L) { - return cache[value.toInt()] + return cache[value.toInt() + 1024] } return ImpreciseFraction(value)