forked from openrs2/openrs2
parent
5c5a908a37
commit
bfcb373ade
@ -0,0 +1,15 @@ |
||||
package dev.openrs2.asm |
||||
|
||||
object ClassVersionUtils { |
||||
private fun swapWords(v: Int): Int { |
||||
return (v shl 16) or (v ushr 16) |
||||
} |
||||
|
||||
fun maxVersion(v1: Int, v2: Int): Int { |
||||
return if (swapWords(v1) > swapWords(v2)) { |
||||
v1 |
||||
} else { |
||||
v2 |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue