public static int getTileHash ( int x , int y ) { long seed = ( ( ( x << 2 ) ^ y ) ^ MULTIPLIER ) & MASK ; long hash = ( seed * MULTIPLIER + ADDEND ) & MASK ; return ( int ) ( hash >>> 30 ) ; }
Compute some hash value for randomizing tileset picks based on x and y coordinates .