Thought of something while I was at work that would give the exact decimal instead of a .0625 approximation which is what you get when simply doing player.x [mod] 64
PHP Code:
int(player.x % 64) + (player.x - int(player.x));
but what napo said might be easier