Math Guess – Should There Exist Snap To Value Functions?

My idea is inspired by window snap to side function in Linux.

What if you could calculate with snap to value functions in mathematics. I guess that it should exist because a snap function acts like a metal to a magnet. I mean it exists in the world.

So the idea is that when the object is sufficiently close to a criteria it snaps into place.

The window snap to side function is a valuable feature of a window manager maybe it can prove useful in other places. Maybe there are also snap to shape functions of objects. So to ?simplify a simulation you have snap to position and snap to shape functions.