Simplify code; provide identity snapPoint function

I think this covers everything that IITC uses.  If you intend to push snapping upstream, then it may need additional testing to make sure all of the corner cases are handled.