You've already forked lazarus-ccr
* added re operator overloads to spkmath
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1697 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -289,14 +289,34 @@ type
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$ifndef EnhancedRecordSupport}
|
||||
operator - (Left: T2DIntVector; Right: T2DIntVector): T2DIntVector;
|
||||
|
||||
operator - (Left: T2DIntRect; Right: T2DIntVector): T2DIntRect;
|
||||
|
||||
operator := (ARect: TRect): T2DIntRect;
|
||||
|
||||
operator - (Left: T2DVector; Right: T2DVector): T2DVector;
|
||||
|
||||
operator - (Left: T3DVector; Right: T3DVector): T3DVector;
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
|
||||
{$ifndef EnhancedRecordSupport}
|
||||
|
||||
operator - (Left: T2DIntVector; Right: T2DIntVector): T2DIntVector;
|
||||
begin
|
||||
Result.x := Left.x - Right.x;
|
||||
Result.y := Left.y - Right.y;
|
||||
end;
|
||||
|
||||
operator - (Left: T2DIntRect; Right: T2DIntVector): T2DIntRect;
|
||||
begin
|
||||
Result.Create(Left.Left - Right.x, Left.Top - Right.y,
|
||||
Left.Right - Right.x, Left.Bottom - Right.y);
|
||||
end;
|
||||
|
||||
operator := (ARect: TRect): T2DIntRect;
|
||||
begin
|
||||
Result.Left := ARect.Left;
|
||||
@ -318,6 +338,8 @@ begin
|
||||
Result.z := Left.z - Right.z;
|
||||
end;
|
||||
|
||||
{$endif}
|
||||
|
||||
{ T2DIntVector }
|
||||
|
||||
constructor T2DIntVector.Create(Ax, Ay: integer);
|
||||
|
Reference in New Issue
Block a user