Re:Ask HN: What piece of code/codebase blew your mind when y...
by fegu on Monday October 31, 2022 @06:09PM
(#33413991)
The doom square root trick. Reducing an expensive function to almost nothing with low error. Many writeups on the web far better than I could give.
[ Parent
| on HN ]
Re:Ask HN: What piece of code/codebase blew your mind when y...
by jesse__ on Monday October 31, 2022 @06:18PM
(#33414093)
I think you mean quakes fast inverse square root? Not aware doom had a clever sqrt routine, but I would be happy to be wrong!
Re:Ask HN: What piece of code/codebase blew your mind when y...
by intelVISA on Monday October 31, 2022 @07:10PM
(#33414648)
obligatory //what the fuck?
Re:Ask HN: What piece of code/codebase blew your mind when y...
by pjscott on Monday October 31, 2022 @08:24PM
(#33415330)
You’re right. Doom used fixed-point math; at the time, hardware floating-point units were far from ubiquitous on the computers people wanted to use to play it.