From 89e30c1af5c20209185150fcd7fbb98ccdbcacbf Mon Sep 17 00:00:00 2001 From: Raymond Date: Sun, 23 May 2010 11:55:27 +0200 Subject: [PATCH] Minor fixes --- Units/MMLAddon/mmlpsthread.pas | 2 +- Units/MMLCore/mmath.pas | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 577f9bb..e48ca2d 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -361,7 +361,7 @@ begin Includes.Add(path); try - f:= TFileStream.Create(UTF8ToSys(Path), fmOpenRead or fmShareDenyWrite); + f:= TFileStream.Create(UTF8ToSys(Path), fmOpenRead); SetLength(contents, f.Size); f.Read(contents[1], Length(contents)); result:= true; diff --git a/Units/MMLCore/mmath.pas b/Units/MMLCore/mmath.pas index a34a2f8..f29fa46 100644 --- a/Units/MMLCore/mmath.pas +++ b/Units/MMLCore/mmath.pas @@ -75,8 +75,8 @@ var angle : extended; begin angle := ArcTan2(pt.y-my,pt.x-mx); - result.y := round(sin(angle) * newdist) + mx; - result.x := round(cos(angle) * newdist) + my; + result.x := round(cos(angle) * newdist) + mx; + result.y := round(sin(angle) * newdist) + my; end; function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean; @@ -92,8 +92,8 @@ begin for i := high(TPA) downto 0 do begin angle := ArcTan2(TPA[i].y-my,TPA[i].x-mx); - TPA[i].y := round(sin(angle) * newdist) + mx; - TPA[i].x := round(cos(angle) * newdist) + my; + TPA[i].x := round(cos(angle) * newdist) + mx; + TPA[i].y := round(sin(angle) * newdist) + my; end; except result := false;