1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-27 11:32:18 -05:00

MML: Changed PointToBox parameters to be more clear

This commit is contained in:
Cohen Adair 2011-08-12 00:39:54 -04:00
parent 96025597f9
commit 23e518f531
2 changed files with 6 additions and 6 deletions

View File

@ -172,12 +172,12 @@ begin;
result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2))); result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2)));
end; end;
function ps_PointToBox(PT1,PT2 : TPoint) : TBox; extdecl; function ps_PointToBox(topLeft,bottomRight: TPoint): TBox; extdecl;
begin; begin;
result.x1 := PT1.x; result.x1 := topLeft.x;
result.y1 := PT1.y; result.y1 := topLeft.y;
result.x2 := PT2.x; result.x2 := bottomRight.x;
result.y2 := PT2.y; result.y2 := bottomRight.y;
end; end;
function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl; function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl;

View File

@ -69,7 +69,7 @@ AddFunction(@ps_iAbs,'function iAbs(a : integer) : integer;');
AddFunction(@ps_ArcTan2,'function ArcTan2(y,x : extended) : extended;'); AddFunction(@ps_ArcTan2,'function ArcTan2(y,x : extended) : extended;');
AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;'); AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;');
AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;'); AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;');
AddFunction(@ps_PointToBox,'function PointToBox(PT1,PT2 : TPoint): TBox;'); AddFunction(@ps_PointToBox,'function PointToBox(topLeft,bottomRight: TPoint): TBox;');
AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;'); AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;');
AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;'); AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;');
AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;'); AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;');