hedgewars/uLandGenTemplateBased.pas
changeset 10494 0eb97cf4c78e
parent 10478 12662c21e0e9
child 10495 6d61b44a5652
--- a/hedgewars/uLandGenTemplateBased.pas	Wed Nov 12 22:47:43 2014 +0900
+++ b/hedgewars/uLandGenTemplateBased.pas	Fri Nov 14 17:00:47 2014 +0300
@@ -196,7 +196,7 @@
                 if (aqpb <> 0) then
                 begin
                     // (ix; iy) is intersection point
-                    iy:= ((Int64(pa.ar[i].x - mp.x) * b + Int64(mp.y) * a) * q - Int64(pa.ar[i].y) * p * b) div aqpb;
+                    iy:= (((Int64(pa.ar[i].x) - mp.x) * b + Int64(mp.y) * a) * q - Int64(pa.ar[i].y) * p * b) div aqpb;
                     if abs(b) > abs(q) then
                         ix:= (iy - mp.y) * a div b + mp.x
                     else
@@ -227,7 +227,7 @@
                 if (aqpb <> 0) then
                 begin
                     // (ix; iy) is intersection point
-                    iy:= ((Int64(p1.x - mp.x) * b + Int64(mp.y) * a) * q - Int64(p1.y) * p * b) div aqpb;
+                    iy:= (((Int64(p1.x) - mp.x) * b + Int64(mp.y) * a) * q - Int64(p1.y) * p * b) div aqpb;
                     if abs(b) > abs(q) then
                         ix:= (iy - mp.y) * a div b + mp.x
                     else
@@ -246,7 +246,7 @@
                 if (aqpb <> 0) then
                 begin
                     // (ix; iy) is intersection point
-                    iy:= ((Int64(p2.x - mp.x) * b + Int64(mp.y) * a) * q - Int64(p2.y) * p * b) div aqpb;
+                    iy:= (((Int64(p2.x) - mp.x) * b + Int64(mp.y) * a) * q - Int64(p2.y) * p * b) div aqpb;
                     if abs(b) > abs(q) then
                         ix:= (iy - mp.y) * a div b + mp.x
                     else