Fix plain wrong unsigned rem implementation

This commit is contained in:
Ilya Gorbunov
2018-08-02 23:11:21 +03:00
parent b412143fce
commit e18bebf12a
@@ -10,7 +10,7 @@ internal fun uintCompare(v1: Int, v2: Int): Int = (v1 xor Int.MIN_VALUE).compare
internal fun ulongCompare(v1: Long, v2: Long): Int = (v1 xor Long.MIN_VALUE).compareTo(v2 xor Long.MIN_VALUE)
internal fun uintDivide(v1: UInt, v2: UInt): UInt = (v1.toLong() / v2.toLong()).toUInt()
internal fun uintRemainder(v1: UInt, v2: UInt): UInt = (v1.toLong() / v2.toLong()).toUInt()
internal fun uintRemainder(v1: UInt, v2: UInt): UInt = (v1.toLong() % v2.toLong()).toUInt()
// TODO: Add reference to Guava implementation source
internal fun ulongDivide(v1: ULong, v2: ULong): ULong {