TMtx::Diag Method

TMtx *Diag(TVec *Vec, int k);

Sets the matrix diagonal to values from the vector.

#NameTypeDescription
1VecTVec *
2kint
Remarks:

Sets the k-th diagonal of the calling matrix to values from from the Vec object. If k = 0 then the main diagonal matrix is set, if k < 0 then the k-th subdiagonal matrix is set and if k > 0 the then the k-th super diagonal is set. The matrix must be large enough to hold diagonal or an exception is raised.

See Also: TVec::Diag
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler