Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function SubScaled(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec; | self = X*xScale - Y*yScale - Z*zScale |
| └ indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const xScale: TCplx; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec; | ||
| 2 | function SubScaled(const X: TMtxVec; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec; | self = X - Y*yScale - Z*zScale |
| └ indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec; | ||
| 3 | function SubScaled(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): TMtxVec; | self = X - Y - Z*zScale |
| └ indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec; | ||
| 4 | function SubScaled(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): TMtxVec; | self = X - Y - Z*zScale |
| └ indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec; | ||
| 5 | function SubScaled(const X: TMtxVec; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): TMtxVec; | self = X - Y*yScale - Z*zScale |
| └ indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec; | ||
| 6 | function SubScaled(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): TMtxVec; | self = X*xScale - Y*yScale - Z*zScale |
| └ indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const xScale: Double; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec; |
Overload 1: function SubScaled(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec;
Compute X*xScale - Y*yScale - Z*zScale
Result: stored in self (calling object), returns self for chaining
Indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const xScale: TCplx; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;
Compute X*xScale - Y*yScale - Z*zScale on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | xScale | TCplx | |
| 4 | Y | TMtxVec | |
| 5 | YIndex | Integer | Y start index |
| 6 | yScale | TCplx | |
| 7 | Z | TMtxVec | |
| 8 | zIndex | Integer | |
| 9 | zScale | TCplx | |
| 10 | Index | Integer | start index |
| 11 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Overload 2: function SubScaled(const X: TMtxVec; const Y: TMtxVec; const yScale: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec;
Compute X - Y*yScale - Z*zScale
Result: stored in self (calling object), returns self for chaining
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
yScale, zScale: Double;
begin
yScale := 1.5;
zScale := 2.0;
X := [5,6,7,8];
Y := [1,2,3,4];
Z := [1,1,1,1];
A1 := X - Y * yScale - Z * zScale;
A2 := SubScaled(X, Y, yScale, Z, zScale);
A3.SubScaled(X, Y, yScale, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;
Compute X - Y*yScale - Z*zScale on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | Y | TMtxVec | |
| 4 | YIndex | Integer | Y start index |
| 5 | yScale | TCplx | |
| 6 | Z | TMtxVec | |
| 7 | zIndex | Integer | |
| 8 | zScale | TCplx | |
| 9 | Index | Integer | start index |
| 10 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Overload 3: function SubScaled(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): TMtxVec;
Compute X - Y - Z*zScale
Result: stored in self (calling object), returns self for chaining
Indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;
Compute X - Y - Z*zScale on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | Y | TMtxVec | |
| 4 | YIndex | Integer | Y start index |
| 5 | Z | TMtxVec | |
| 6 | zIndex | Integer | |
| 7 | zScale | TCplx | |
| 8 | Index | Integer | start index |
| 9 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Overload 4: function SubScaled(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): TMtxVec;
Compute X - Y - Z*zScale
Result: stored in self (calling object), returns self for chaining
Indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;
Compute X - Y - Z*zScale on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | Y | TMtxVec | |
| 4 | YIndex | Integer | Y start index |
| 5 | Z | TMtxVec | |
| 6 | zIndex | Integer | |
| 7 | zScale | Double | |
| 8 | Index | Integer | start index |
| 9 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Overload 5: function SubScaled(const X: TMtxVec; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): TMtxVec;
Compute X - Y*yScale - Z*zScale
Result: stored in self (calling object), returns self for chaining
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
xScale, yScale, zScale: Double;
begin
xScale := 1.0;
yScale := 2.0;
zScale := 3.0;
X := [5,6,7,8];
Y := [1,2,3,4];
Z := [1,1,1,1];
A1 := X * xScale - Y * yScale - Z * zScale;
A2 := SubScaled(X, xScale, Y, yScale, Z, zScale);
A3.SubScaled(X, xScale, Y, yScale, Z, zScale);
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;
Compute X - Y*yScale - Z*zScale on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | Y | TMtxVec | |
| 4 | YIndex | Integer | Y start index |
| 5 | yScale | Double | |
| 6 | Z | TMtxVec | |
| 7 | zIndex | Integer | |
| 8 | zScale | Double | |
| 9 | Index | Integer | start index |
| 10 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
uses MtxVec, MtxExpr, Math387;
var
X, Y, Z, A1, A2, A3: Vector;
zScale: Double;
begin
zScale := 2.0;
X := [5,6,7,8];
Y := [1,2,3,4];
Z := [1,1,1,1];
A1 := X - Y - Z * zScale;
A2 := SubScaled(X, Y, Z, zScale);
A3.Sub(X, Y, Z * zScale); // Alternatively, a dedicated overload can be used.
if not A2.IsEqual(A1) then ERaise('Problem');
if not A3.IsEqual(A1) then ERaise('Problem');
end;
Overload 6: function SubScaled(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double; const Z: TMtxVec; const zScale: Double): TMtxVec;
Compute X*xScale - Y*yScale - Z*zScale
Result: stored in self (calling object), returns self for chaining
Indexed: function SubScaled(const X: TMtxVec; XIndex: Integer; const xScale: Double; const Y: TMtxVec; YIndex: Integer; const yScale: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;
Compute X*xScale - Y*yScale - Z*zScale on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | xScale | Double | |
| 4 | Y | TMtxVec | |
| 5 | YIndex | Integer | Y start index |
| 6 | yScale | Double | |
| 7 | Z | TMtxVec | |
| 8 | zIndex | Integer | |
| 9 | zScale | Double | |
| 10 | Index | Integer | start index |
| 11 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining