ForceRowVector

From the Oblivion ConstructionSet Wiki
Revision as of 01:23, 9 August 2010 by imported>CSbot (Automated import of articles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(rowVector:array) ForceRowVector vector1d:array 
(rowVector:array) RowVec vector1d:array

Takes a one-dimensional array, and returns an equivalent two-dimensional array, where the outer array's only element is the 1d array; i.e. A[0][j] == v[j]. This forces various linear algebra functions to treat the vector as a row vector, and can be necessary when using MatrixMultiply.

Note that row vectors require only 2 array variables, as opposed to the n+1 (where n is the number of elements) array variables needed for column vectors; for this reason, row vectors are generally preferred.