From 1ad0a41786a8fba804a9c38742900f10fbf021e7 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Jul 2023 17:07:59 +0700 Subject: [PATCH] oh my god --- .../kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt index 267509fb1..e91bc36a9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt @@ -142,9 +142,9 @@ class Decimal private constructor(val mag: BigInteger, marker: Nothing?) : Numbe operator fun times(other: Decimal): Decimal { if (other.mag.signum() == 0) { return ZERO - } else if (other.mag == BigInteger.ONE) { + } else if (other == ONE) { return this - } else if (other.mag == BI_MINUS_ONE) { + } else if (other == MINUS_ONE) { return Decimal(-mag, null) } @@ -161,9 +161,9 @@ class Decimal private constructor(val mag: BigInteger, marker: Nothing?) : Numbe operator fun div(other: Decimal): Decimal { if (other.mag.signum() == 0) { throw ArithmeticException("Attempt to divide $this by zero") - } else if (other.mag == BigInteger.ONE) { + } else if (other == ONE) { return this - } else if (other.mag == BI_MINUS_ONE) { + } else if (other == MINUS_ONE) { return Decimal(-mag, null) }