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)