Browse Source

* Add delphi-compatible TPointF.EqualsTo overload

Michaël Van Canneyt 1 year ago
parent
commit
3a1f180a56
1 changed files with 8 additions and 1 deletions
  1. 8 1
      rtl/objpas/types.pp

+ 8 - 1
rtl/objpas/types.pp

@@ -145,7 +145,8 @@ type
           procedure Offset(const apt :TPointF);
           procedure Offset(const apt :TPointF);
           procedure Offset(const apt :TPoint);
           procedure Offset(const apt :TPoint);
           procedure Offset(dx,dy : Single);
           procedure Offset(dx,dy : Single);
-          function EqualsTo(const apt: TPointF; const aEpsilon : Single): Boolean;
+          function EqualsTo(const apt: TPointF; const aEpsilon : Single): Boolean; overload;
+          function EqualsTo(const apt: TPointF): Boolean; overload;
 
 
           function  Scale (afactor:Single)  : TPointF;
           function  Scale (afactor:Single)  : TPointF;
           function  Ceiling : TPoint;
           function  Ceiling : TPoint;
@@ -1050,6 +1051,12 @@ begin
   y:=y+dy;
   y:=y+dy;
 end;
 end;
 
 
+function TPointF.EqualsTo(const apt: TPointF): Boolean;
+
+begin
+  Result:=EqualsTo(apt,0);
+end;
+
 function TPointF.EqualsTo(const apt: TPointF; const aEpsilon: Single): Boolean;
 function TPointF.EqualsTo(const apt: TPointF; const aEpsilon: Single): Boolean;
 
 
   function Eq(a,b : single) : boolean; inline;
   function Eq(a,b : single) : boolean; inline;