NAME

transpose - returns transpose matrix of a matrix

SYNOPSIS

  float4x4 transpose( float4x4 A );
  float3x4 transpose( float4x3 A );
  float2x4 transpose( float4x2 A );
  float1x4 transpose( float4x1 A );
  
  float4x3 transpose( float3x4 A );
  float3x3 transpose( float3x3 A );
  float2x3 transpose( float3x2 A );
  float1x3 transpose( float3x1 A );
 
  float4x2 transpose( float2x4 A );
  float3x2 transpose( float2x3 A );
  float2x2 transpose( float2x2 A );
  float1x2 transpose( float2x1 A );
 
  float4x1 transpose( float1x4 A );
  float3x1 transpose( float1x3 A );
  float2x1 transpose( float1x2 A );
  float1x1 transpose( float1x1 A );

PARAMETERS

A

Matrix to tranpose.

DESCRIPTION

Returns the transpose of the matrix A.

REFERENCE IMPLEMENTATION

transpose for a float4x3 matrix can be implemented like this:

  float4x3 transpose(float3x4 A)
  {
    float4x3 C;

    C[0] = A._m00_m10_m20;
    C[1] = A._m01_m11_m21;
    C[2] = A._m02_m12_m22;
    C[3] = A._m03_m13_m23;

    return C;
  }

PROFILE SUPPORT

transpose is supported in all profiles.

SEE ALSO

determinant, mul