what
This commit is contained in:
parent
c25d8729c2
commit
b010bcdd5d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user