Vector.SqrAddScaled Method

Overload List

#SignatureDescription
1TMtxVec SqrAddScaled(TMtxVec X, TCplx xScale, TMtxVec Y, TCplx yScale)self = sqr(X)*xScale + sqr(Y)*yScale
└ indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, TCplx xScale, TMtxVec Y, Int32 YIndex, TCplx yScale, Int32 Index, Int32 Len)
2TMtxVec SqrAddScaled(TMtxVec X, TMtxVec Y, TCplx yScale)self = sqr(X) + sqr(Y)*yScale
└ indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TCplx yScale, Int32 Index, Int32 Len)
3TMtxVec SqrAddScaled(TMtxVec X, TMtxVec Y, Double yScale)self = sqr(X) + sqr(Y)*yScale
└ indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, Double yScale, Int32 Index, Int32 Len)
4TMtxVec SqrAddScaled(TMtxVec X, Double xScale, TMtxVec Y, Double yScale)self = sqr(X)*xScale + sqr(Y)*yScale
└ indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, Double xScale, TMtxVec Y, Int32 YIndex, Double yScale, Int32 Index, Int32 Len)

Overload 1: TMtxVec SqrAddScaled(TMtxVec X, TCplx xScale, TMtxVec Y, TCplx yScale)

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

Indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, TCplx xScale, TMtxVec Y, Int32 YIndex, TCplx yScale, Int32 Index, Int32 Len)

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2XIndexInt32X start index
3xScaleTCplxscalar
4YTMtxVecsource TVec or TMtx
5YIndexInt32Y start index
6yScaleTCplxscalar
7IndexInt32start index
8LenInt32element count

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

Overload 2: TMtxVec SqrAddScaled(TMtxVec X, TMtxVec Y, TCplx yScale)

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

Indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TCplx yScale, Int32 Index, Int32 Len)

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2XIndexInt32X start index
3YTMtxVecsource TVec or TMtx
4YIndexInt32Y start index
5yScaleTCplxscalar
6IndexInt32start index
7LenInt32element count

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

Overload 3: TMtxVec SqrAddScaled(TMtxVec X, TMtxVec Y, Double yScale)

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

Indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, Double yScale, Int32 Index, Int32 Len)

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2XIndexInt32X start index
3YTMtxVecsource TVec or TMtx
4YIndexInt32Y start index
5yScaleDoublescalar
6IndexInt32start index
7LenInt32element count

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

Overload 4: TMtxVec SqrAddScaled(TMtxVec X, Double xScale, TMtxVec Y, Double yScale)

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

Indexed: TMtxVec SqrAddScaled(TMtxVec X, Int32 XIndex, Double xScale, TMtxVec Y, Int32 YIndex, Double yScale, Int32 Index, Int32 Len)

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

#NameTypeDescription
1XTMtxVecsource TVec or TMtx
2XIndexInt32X start index
3xScaleDoublescalar
4YTMtxVecsource TVec or TMtx
5YIndexInt32Y start index
6yScaleDoublescalar
7IndexInt32start index
8LenInt32element count

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