I’d vote for isZero, isPositive, and isNegative extensions, all based on signum, as part of the standard library.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Strange BigDecimal result | 2 | 1761 | April 27, 2023 | |
Why Kotlin doesn't respect comparable properties in equals() method during bytecode generation for dataclasses? | 11 | 4913 | June 14, 2017 | |
`val a = 0 ?: 0.1`
|
17 | 5406 | January 30, 2018 | |
When == isn't equals() | 1 | 3181 | August 20, 2018 | |
ByteArray Comparison | 14 | 20168 | May 29, 2016 |