don’t use floats or doubles or actionscript’s Numbers for the positions of things. Use integers. Trust me. There’s basically no reason to use questionably accurate values when it takes the slightest touchiest bit more code to manage beautiful, discrete integer locations.
If you must, keep a decimal buffer value (like this: “I’m standing at x=10, y=15, but my subx offset is something like -0.1”) for use with decimal velocities, and clear it when you come to a halt.
If I’m going way over your head, that’s okay. Wait for my next blog post :x I’ll try to do another LMSD!