Open-source multiplayer game server compatible with the RuneScape client https://www.openrs2.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
openrs2/asm/src/main/java/org/openrs2/asm/ClassVersionUtils.kt

19 lines
392 B

package org.openrs2.asm
public object ClassVersionUtils {
private fun swapWords(v: Int): Int {
return (v shl 16) or (v ushr 16)
}
public fun gte(v1: Int, v2: Int): Boolean {
return swapWords(v1) >= swapWords(v2)
}
public fun max(v1: Int, v2: Int): Int {
return if (gte(v1, v2)) {
v1
} else {
v2
}
}
}