Add gte() method to ClassVersionUtils

bzip2
Graham 5 years ago
parent acce037eac
commit bbe4157124
  1. 6
      asm/src/main/java/dev/openrs2/asm/ClassVersionUtils.kt

@ -5,8 +5,12 @@ object ClassVersionUtils {
return (v shl 16) or (v ushr 16)
}
fun gte(v1: Int, v2: Int): Boolean {
return swapWords(v1) >= swapWords(v2)
}
fun maxVersion(v1: Int, v2: Int): Int {
return if (swapWords(v1) > swapWords(v2)) {
return if (gte(v1, v2)) {
v1
} else {
v2

Loading…
Cancel
Save