virtual joystick for touch devices. takes the incoming angle and limits it to just [UP DOWN LEFT RIGHT] intended for touch screens where input can be a bit imprecise, with visual feedback which direction it is currently in.
uses a limiting mechanism which forces the new angle to be further past the expected 45 deg angle thresholds between the directions. this is to prevent inputs from unexpectedly changing when a finger is sitting on one of those 45deg thresholds.