Index: /issm/trunk-jpl/src/m/geometry/SegIntersect.m
===================================================================
--- /issm/trunk-jpl/src/m/geometry/SegIntersect.m	(revision 13350)
+++ /issm/trunk-jpl/src/m/geometry/SegIntersect.m	(revision 13351)
@@ -1,3 +1,3 @@
-function bool=SegIntersect(seg1,seg2)
+function bval=SegIntersect(seg1,seg2)
 %SEGINTERSECT - test of segments intersection
 %
@@ -7,7 +7,7 @@
 %
 %   Usage:
-%      bool=SegIntersect(seg1,seg2)
+%      bval=SegIntersect(seg1,seg2)
 
-bool=1;
+bval=1;
 
 xA=seg1(1,1); yA=seg1(1,2);
@@ -16,11 +16,11 @@
 xD=seg2(2,1); yD=seg2(2,2);
 
-O2A=[xA;yA]-[xD/2+xC/2;yD/2+yC/2];
-O2B=[xB;yB]-[xD/2+xC/2;yD/2+yC/2];
-O1C=[xC;yC]-[xA/2+xB/2;yB/2+yA/2];
-O1D=[xD;yD]-[xA/2+xB/2;yB/2+yA/2];
+O2A=[xA;yA]-[xD/2.+xC/2.;yD/2.+yC/2.];
+O2B=[xB;yB]-[xD/2.+xC/2.;yD/2.+yC/2.];
+O1C=[xC;yC]-[xA/2.+xB/2.;yB/2.+yA/2.];
+O1D=[xD;yD]-[xA/2.+xB/2.;yB/2.+yA/2.];
 
 n1=[yA-yB;xB-xA]; %normal vector to segA
-n2=[yC-yD;xD-xC]; %normal vectot to segB
+n2=[yC-yD;xD-xC]; %normal vector to segB
 
 test1=n2'*O2A;
@@ -28,5 +28,5 @@
 
 if test1*test2>0
-	bool=0;
+	bval=0;
 	return;
 end
@@ -36,5 +36,5 @@
 
 if test3*test4>0
-	bool=0;
+	bval=0;
 	return;
 end
@@ -44,5 +44,5 @@
 
 	%projection on the axis O1O2
-	O2O1=[xA/2+xB/2;yB/2+yA/2]-[xD/2+xC/2;yD/2+yC/2];
+	O2O1=[xA/2.+xB/2.;yB/2.+yA/2.]-[xD/2.+xC/2.;yD/2.+yC/2.];
 	O1A=O2O1'*(O2A-O2O1);
 	O1B=O2O1'*(O2B-O2O1);
@@ -50,30 +50,30 @@
 	O1D=O2O1'*O1D;
 	
-	%test if one point is included in the other segment (->bool=1)
+	%test if one point is included in the other segment (->bval=1)
 	if (O1C-O1A)*(O1D-O1A)<0
-		bool=1;
+		bval=1;
 		return;
 	end
 	if (O1C-O1B)*(O1D-O1B)<0
-		bool=1;
+		bval=1;
 		return;
 	end
 	if (O1A-O1C)*(O1B-O1C)<0
-		bool=1;
+		bval=1;
 		return;
 	end
 	if (O1A-O1D)*(O1B-O1D)<0
-		bool=1;
+		bval=1;
 		return;
 	end
 
-	 %test if the 2 segments have the same middle (->bool=1)
+	 %test if the 2 segments have the same middle (->bval=1)
 	if O2O1==0
-		bool=1;
+		bval=1;
 		return;
 	end
 
 	%else
-	bool=0;
+	bval=0;
 	return;
 end
