Cleanup snapToGrid functions

Cleaned up snapToGrid32 and snapToGrid64, removed loops replaced with straight division/mult and flooring
Merge pull request #1 from oswynb/patch-1

Cleanup snapToGrid functions