matrixTranspose: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(pic, format)
Line 6: Line 6:
|1.92|Game Version =(number surrounded by NO SPACES)
|1.92|Game Version =(number surrounded by NO SPACES)


|arg=  |Multiplayer Arguments =("local" or "global")
|arg=  |Multiplayer Arguments =("local" or "global")  


|eff=  |Multiplayer Effects =("local" or "global")
|eff=  |Multiplayer Effects =("local" or "global")
Line 13: Line 13:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns transposed input matrix |Description=
| Returns transposed version of the given matrix. The matrix is an [[Array]] of rows. Each row is an [[Array]] of corresponding column values for the row.
<br><br>
[[Image:matrixTranspose.jpg|500px]]
<br><br> |Description=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[matrixTranspose]] matrix |Syntax=
| [[matrixTranspose]] matrix |Syntax=


|p1=matrix: [[Array]]
|p1=matrix: [[Array]] - given matrix |param1=


| [[Array]] |Return Value=
| [[Array]] - transposed matrix |Return Value=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[[matrixTranspose]] [[1,2,3], [3,1,2], [2,3,1]]; // returns [[1,3,2], [2,1,3], [3,2,1]]</code> |EXAMPLE1=
|x1= <code>[[matrixTranspose]]  
|x2= <code>[[matrixTranspose]] &#x5b;[1,2,3]]; // returns [[1], [2], [3]]</code> |EXAMPLE2=
[
[1,2,3],  
[3,1,2],  
[2,3,1]
];  
/* returns  
[
[1,3,2],  
[2,1,3],  
[3,2,1]
] */</code> |EXAMPLE1=
|x2= <code>[[matrixTranspose]]  
[
[1,2,3]
];  
/* returns  
[
[1],
[2],
[3]
] */</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


|mp= - |Multiplayer Behaviour=
|mp= - |Multiplayer Behaviour=


| |See Also=
| [[matrixMultiply]], [[vectorAdd]], [[vectorMagnitude]], [[vectorNormalized]], [[vectorMultiply]], [[vectorDotProduct]], [[vectorCrossProduct]], [[vectorDistance]], [[vectorLinearConversion]], [[vectorCos]], [[vectorFromTo]], [[vectorModelToWorld]], [[vectorWorldToModel]] |See Also=
}}
}}



Revision as of 12:20, 31 October 2019

Hover & click on the images for description

Description

Description:
Returns transposed version of the given matrix. The matrix is an Array of rows. Each row is an Array of corresponding column values for the row.

matrixTranspose.jpg

Multiplayer:
-
Groups:
Uncategorised

Syntax

Syntax:
matrixTranspose matrix
Parameters:
matrix: Array - given matrix
Return Value:
Array - transposed matrix

Examples

Example 1:
matrixTranspose [ [1,2,3], [3,1,2], [2,3,1] ]; /* returns [ [1,3,2], [2,1,3], [3,2,1] ] */
Example 2:
matrixTranspose [ [1,2,3] ]; /* returns [ [1], [2], [3] ] */

Additional Information

See also:
matrixMultiplyvectorAddvectorMagnitudevectorNormalizedvectorMultiplyvectorDotProductvectorCrossProductvectorDistancevectorLinearConversionvectorCosvectorFromTovectorModelToWorldvectorWorldToModel

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Bottom Section