core/vgui/internals/vgui_transpose_4x4.cxx
Go to the documentation of this file.
00001 // This is core/vgui/internals/vgui_transpose_4x4.cxx
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005 //:
00006 // \file
00007 // \author fsm
00008 
00009 #include "vgui_transpose_4x4.h"
00010 
00011 void vgui_transpose_4x4(double A[4][4])
00012 {
00013   double tmp;
00014 #define swup(x, y) { tmp=x; x=y; y=tmp; }
00015   /* */
00016   swup(A[1][0], A[0][1]);
00017   swup(A[2][0], A[0][2]); swup(A[2][1], A[1][2]);
00018   swup(A[3][0], A[0][3]); swup(A[3][1], A[1][3]); swup(A[3][2], A[2][3]);
00019 #undef swup
00020 }