Skip to content

Commit

Permalink
use finite math in raycast
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Oct 6, 2021
1 parent 94946cf commit ad3b026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/raycast/raycast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ namespace
std::vector<Pixel> pixels;
};

constexpr auto noHit = std::numeric_limits<float>::infinity();
constexpr auto noHit = std::numeric_limits<float>::max(); // must be within finite math for -ffast-math

struct Intersection
{
Expand Down

0 comments on commit ad3b026

Please sign in to comment.