Changeset 27 for trunk/UGeometric.pas


Ignore:
Timestamp:
Apr 12, 2015, 1:11:27 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Train position is now relative to nearest down point. Thanks to that trains is not repositioned if line is connected or disconnected to other stations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGeometric.pas

    r25 r27  
    2727function Distance(P1, P2: TPoint): Integer;
    2828begin
    29   Result := Trunc(Sqrt(Sqr(P2.x - P1.X) + Sqr(P2.Y - P1.Y)));
     29  Result := Trunc(Sqrt(Sqr(P2.X - P1.X) + Sqr(P2.Y - P1.Y)));
    3030end;
    3131
     
    122122function ArcTanPoint(Point: TPoint): Float;
    123123begin
    124   Result := ArcTan(Point.Y / Point.X);
     124  Result := ArcTan(Point.X / Point.Y);
    125125end;
    126126
Note: See TracChangeset for help on using the changeset viewer.