3 ms·
And there are algorithms that rely on this, like this[1] branchless axis-aligned bounding box intersection test. It exploits the division by zero sign logic o
by magicalhippo 5y ago
And there are algorithms that rely on this, like this[1] branchless axis-aligned bounding box intersection test.
It exploits the division by zero sign logic of IEEE-754, so that the min/max operations used also handles the edge cases where the ray is parallel to an axis.
[1]: https://tavianator.com/2011/ray_box.html https://tavianator.com/2011/ray_box.html