Index: trunk/Mars/mbase/MMath.cc
===================================================================
--- trunk/Mars/mbase/MMath.cc	(revision 17160)
+++ trunk/Mars/mbase/MMath.cc	(revision 17161)
@@ -619,5 +619,5 @@
 // Formula from: http://mathworld.wolfram.com/Line-LineIntersection.html
 //
-TVector2 MMath::GetIntersectionPoint(const TVector2 &x1, const TVector2 &y1, const TVector2 &x2, const TVector2 &y2)
+TVector2 MMath::GetIntersectionPoint(const TVector2 &x1, const TVector2 &y1, const TVector2 &x2, const TVector2 &y2, Bool_t &rc)
 {
     TMatrix d(2,2);
@@ -629,5 +629,10 @@
     const Double_t denom = d.Determinant();
     if (denom==0)
+    {
+        rc = false;
         return TVector2();
+    }
+
+    rc = true;
 
     TMatrix l1(2,2);
@@ -658,4 +663,10 @@
 
     return TVector2(X, Y);
+}
+
+TVector2 MMath::GetIntersectionPoint(const TVector2 &x1, const TVector2 &y1, const TVector2 &x2, const TVector2 &y2)
+{
+    Bool_t rc;
+    return GetIntersectionPoint(x1, y1, x2, y2, rc);
 }
 
Index: trunk/Mars/mbase/MMath.h
===================================================================
--- trunk/Mars/mbase/MMath.h	(revision 17160)
+++ trunk/Mars/mbase/MMath.h	(revision 17161)
@@ -55,4 +55,5 @@
     Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x);
 
+    TVector2 GetIntersectionPoint(const TVector2 &x1, const TVector2 &y1, const TVector2 &x2, const TVector2 &y2, Bool_t &rc);
     TVector2 GetIntersectionPoint(const TVector2 &x1, const TVector2 &y1, const TVector2 &x2, const TVector2 &y2);
 
