Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
binkley committed Jun 24, 2020
1 parent 21a4dc9 commit db4e01f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/kotlin/hm/binkley/math/maths.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import java.math.BigInteger.ZERO
internal typealias BInt = BigInteger
internal typealias BDouble = BigDecimal

internal fun BInt.isZero() = this == ZERO
internal fun BInt.isOne() = this == ONE
internal fun BInt.isTwo() = this == TWO
internal fun BInt.isTen() = this == TEN
internal fun BInt.isZero() = ZERO == this
internal fun BInt.isOne() = ONE == this
internal fun BInt.isTwo() = TWO == this
internal fun BInt.isTen() = TEN == this

internal fun BInt.isDyadic() = (isOne() || (this % TWO).isZero())

Expand All @@ -22,4 +22,4 @@ internal fun BInt.isPAdic(p: Long) =

internal fun BInt.lcm(other: BInt) = (this * (other / gcd(other))).abs()

internal fun BInt.isEven() = ZERO == this % TWO
internal fun BInt.isEven() = (this % TWO).isZero()

0 comments on commit db4e01f

Please # to comment.