This doesn’t look pretty or accomplish anything groundbreaking, but may come in handy for someone looking to constrain the movement of something like the crosshairs in a game.
I am working on a game (play my finished games HERE) and wanted to constrain the movement of the mouse controlled crosshair to a certain radius around the player. Since it gave me difficulties I figured I’d post a simple demonstration of my solution.