Difference between revisions of "ForceColumnVector"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>CSbot
(Automated import of articles)
 
imported>DragoonWraith
Line 1: Line 1:
{{BotAddedPage|CSbot|DragoonWraith}}
{{Function
{{Function
  | origin = OBSE
  | origin = OBSE
Line 18: Line 17:
[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0019)]]
[[Category:Math Functions]]
[[Category:Math Functions]]
[[Category:Math Functions (OBSE)]]
[[Category:Math Functions (OBSE)]]
[[Category:Linear Algebra Functions (OBSE)]]
[[Category:Linear Algebra Functions (OBSE)]]

Revision as of 00:29, 10 August 2010

< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(colVector:array) ForceColumnVector vector1d:array 
(colVector:array) ColVec vector1d:array

Takes a one-dimensional array, and returns an equivalent two-dimensional array, where the outer array's elements are each arrays with only one element - each element in the 1d array. I.e., A[i][0] == v<nowiki>[i]<nowiki>. This forces various linear algebra functions to treat the vector as a column 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.