Fixing bug in faceIntersection where the sign of the distance was

being discarded on return from the triPointRef intersecion test.  Was
only appearing when using FULL_RAY tests.
This commit is contained in:
graham
2009-10-09 10:39:06 +01:00
parent 822019bb6a
commit 29f40776ed

View File

@ -159,9 +159,9 @@ Foam::pointHit Foam::face::intersection
if (curHit.hit())
{
if (Foam::mag(curHit.distance()) < nearestHitDist)
if (Foam::mag(curHit.distance()) < Foam::mag(nearestHitDist))
{
nearestHitDist = Foam::mag(curHit.distance());
nearestHitDist = curHit.distance();
nearest.setHit();
nearest.setPoint(curHit.hitPoint());
}