Merge pull request #35 from ricochet2200/master

Fix compiler warning on Mac OSX
This commit is contained in:
Benjamin Dobell 2016-04-26 21:47:06 +10:00
commit 0db7f85513

View File

@ -704,7 +704,7 @@ Point LinesSampler::intersection(Line a, Line b) {
float p = a.start.x * a.end.y - a.start.y * a.end.x;
float q = b.start.x * b.end.y - b.start.y * b.end.x;
float denom = dxa * dyb - dya * dxb;
if(abs(denom) < 1e-12) // Lines don't intersect (replaces "denom == 0")
if(std::abs(denom) < 1e-12) // Lines don't intersect (replaces "denom == 0")
return Point(std::numeric_limits<float>::infinity(),
std::numeric_limits<float>::infinity());