Re:Round a direction vector to an 8-way compass
by nmilo on Monday July 25, 2022 @11:17AM
(#32225569)
It's still a difference of 38.5 nano seconds. You have a budget 16,000,000 nanoseconds per frame. It's like Jeff Bezos writing about how to save money at Walmart; just pick the readable and stupid approach and move on. Game loops are made fast or slow by the efficiency of their tight loops: the render loop, physics update loop, UI loop, etc. Something that happens once per frame is barely ever worth considering.
[ Parent
| on HN ]