From: frohlich Date: Thu, 28 Dec 2006 13:25:14 +0000 (+0000) Subject: Modified Files: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26cb8ec4f1db18084e4dcf1c1f9b5baee92d4e7e;p=simgear.git Modified Files: SGIntersect.hxx: Make it compile with win32 --- diff --git a/simgear/math/SGIntersect.hxx b/simgear/math/SGIntersect.hxx index 18a49e8d..4d87d688 100644 --- a/simgear/math/SGIntersect.hxx +++ b/simgear/math/SGIntersect.hxx @@ -570,17 +570,17 @@ intersects(const SGBox& box, const SGRay& ray) return false; } - T near = - SGLimits::max(); - T far = SGLimits::max(); + T nearr = - SGLimits::max(); + T farr = SGLimits::max(); T T1 = (cMin - cOrigin) / cDir; T T2 = (cMax - cOrigin) / cDir; if (T1 > T2) std::swap (T1, T2);/* since T1 intersection with near plane */ - if (T1 > near) near = T1; /* want largest Tnear */ - if (T2 < far) far = T2; /* want smallest Tfar */ - if (near > far) // far box is missed + if (T1 > nearr) nearr = T1; /* want largest Tnear */ + if (T2 < farr) farr = T2; /* want smallest Tfarr */ + if (nearr > farr) // farr box is missed return false; - if (far < 0) // box is behind ray + if (farr < 0) // box is behind ray return false; }