Vector.SqrAddScaled Method

Overload List

#SignatureDescription
1function SqrAddScaled(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double): TMtxVec; overload;self = sqr(X)*xScale + sqr(Y)*yScale
2function SqrAddScaled(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;self = sqr(X)*xScale + sqr(Y)*yScale
3function SqrAddScaled(const X, Y: TMtxVec; const yScale: Double): TMtxVec; overload;self = sqr(X) + sqr(Y)*yScale
4function SqrAddScaled(const X, Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;self = sqr(X) + sqr(Y)*yScale
5function SqrAddScaled(const X: TMtxVec; xIndex: integer; const xScale: Double; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;self = sqr(X)*xScale + sqr(Y)*yScale on sub arrays
6function SqrAddScaled(const X: TMtxVec; xIndex: integer; const xScale: TCplx; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;self = sqr(X)*xScale + sqr(Y)*yScale on sub arrays
7function SqrAddScaled(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;self = sqr(X) + sqr(Y)*yScale on sub arrays
8function SqrAddScaled(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;self = sqr(X) + sqr(Y)*yScale on sub arrays

Overload 1: function SqrAddScaled(const X: TMtxVec; const xScale: Double; const Y: TMtxVec; const yScale: Double): TMtxVec; overload;

Compute sqr(X)*xScale + sqr(Y)*yScale

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xScaleDoublescalar
3YTMtxVecsource TVec or TMtx
4yScaleDoublescalar

Result: stored in self (calling object), returns self for chaining

Overload 2: function SqrAddScaled(const X: TMtxVec; const xScale: TCplx; const Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;

Compute sqr(X)*xScale + sqr(Y)*yScale

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xScaleTCplxscalar
3YTMtxVecsource TVec or TMtx
4yScaleTCplxscalar

Result: stored in self (calling object), returns self for chaining

Overload 3: function SqrAddScaled(const X, Y: TMtxVec; const yScale: Double): TMtxVec; overload;

Compute sqr(X) + sqr(Y)*yScale

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2YTMtxVecsource TVec or TMtx
3yScaleDoublescalar

Result: stored in self (calling object), returns self for chaining

Remarks:

By making use of yScale, it is also possible to compute the following (at the same or higher speed):

X^2 - Y^2

Overload 4: function SqrAddScaled(const X, Y: TMtxVec; const yScale: TCplx): TMtxVec; overload;

Compute sqr(X) + sqr(Y)*yScale

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2YTMtxVecsource TVec or TMtx
3yScaleTCplxscalar

Result: stored in self (calling object), returns self for chaining

Overload 5: function SqrAddScaled(const X: TMtxVec; xIndex: integer; const xScale: Double; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;

Compute sqr(X)*xScale + sqr(Y)*yScale on sub arrays

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3xScaleDoublescalar
4YTMtxVecsource TVec or TMtx
5yIndexinteger
6yScaleDoublescalar
7Indexintegerstart index
8Lenintegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 6: function SqrAddScaled(const X: TMtxVec; xIndex: integer; const xScale: TCplx; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;

Compute sqr(X)*xScale + sqr(Y)*yScale on sub arrays

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3xScaleTCplxscalar
4YTMtxVecsource TVec or TMtx
5yIndexinteger
6yScaleTCplxscalar
7Indexintegerstart index
8Lenintegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 7: function SqrAddScaled(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: Double; Index, Len: integer): TMtxVec; overload;

Compute sqr(X) + sqr(Y)*yScale on sub arrays

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3YTMtxVecsource TVec or TMtx
4yIndexinteger
5yScaleDoublescalar
6Indexintegerstart index
7Lenintegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 8: function SqrAddScaled(const X: TMtxVec; xIndex: integer; const Y: TMtxVec; yIndex: integer; const yScale: TCplx; Index, Len: integer): TMtxVec; overload;

Compute sqr(X) + sqr(Y)*yScale on sub arrays

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2xIndexinteger
3YTMtxVecsource TVec or TMtx
4yIndexinteger
5yScaleTCplxscalar
6Indexintegerstart index
7Lenintegerelement count

Result: stored in self (calling object), returns self for chaining