Re:Round a direction vector to an 8-way compass
by RicoElectrico on Monday July 25, 2022 @09:39AM
(#32224098)
I wonder if some amount of hysteresis would be helpful to avoid switching back and forth on the edge.
[ Parent
| on HN ]
Re:Round a direction vector to an 8-way compass
by ChrisLomont on Monday July 25, 2022 @06:00PM
(#32231498)
Button debouncing is useful for all sorts of stuff like this, but it requires much trickier code to get right, including tracking some form of history.