Gavin Kistner
1/10/2007 9:55:00 PM
T. W. Urp wrote:
> They never taught me about transposing, just matrix multiplication, and
> googel didnt help either. What is transposing (for transformation matrices)?
Also, RTFM :)
C:\>ri transpose
More than one method matched your request. You can refine
your search by asking for information on one of:
Array#transpose, Matrix#transpose
C:\>ri Array.transpose
--------------------------------------------------------
Array#transpose
array.transpose -> an_array
------------------------------------------------------------------------
Assumes that _self_ is an array of arrays and transposes the rows
and columns.
a = [[1,2], [3,4], [5,6]]
a.transpose #=> [[1, 3, 5], [2, 4, 6]]
C:\>ri Matrix.transpose
-------------------------------------------------------
Matrix#transpose
transpose()
------------------------------------------------------------------------
Returns the transpose of the matrix.
Matrix[[1,2], [3,4], [5,6]]
=> 1 2
3 4
5 6
Matrix[[1,2], [3,4], [5,6]].transpose
=> 1 3 5
2 4 6
(also known as t)