how to convert the position in coordinate X , Y ??
Exemple Position 1310775 = X? Y?
how to convert the position in coordinate X , Y ??
Exemple Position 1310775 = X? Y?
Code:function decode_pos($pos) { $position = array(); $position['X'] = ($pos >> 16); $position['Y'] = $pos ^ ($position['X'] << 16); return $position; }for other functions u can check this php class https://gist.github.com/Stricted/b5026822564d916b7058Code:function encode_pos($X, $Y) { return ($X << 16) | $Y; }
Last edited by Stricted; 08-06-16 at 01:13 AM.
Tks My friend