Bug fixes to coordinate arithmetic

Had a fencepost error in Y — dunno why, since I have the correct logic
for X. Also, replaced the truncate-only real-space logic with some that
rounds to the nearest real-space coordinate (e.g., 42.65 rounds up to
42.8, not truncates to 42.4!).