~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/math/matrix/mat_mat2.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /src/math/matrix/mat_mat2.c (Architecture ppc) and /src/math/matrix/mat_mat2.c (Architecture i386)


  1 /**@(#)Interchange mat2's and matrices              1 /**@(#)Interchange mat2's and matrices
  2  */                                                 2  */
  3                                                     3 
  4 #include <tina/sys.h>                               4 #include <tina/sys.h>
  5 #include <tina/math.h>                              5 #include <tina/math.h>
  6                                                     6 
  7 double  matrix_getf();                              7 double  matrix_getf();
  8 Matrix *matrix_alloc();                             8 Matrix *matrix_alloc();
  9                                                     9 
 10 Matrix *matrix_mat2(Mat2 m)                        10 Matrix *matrix_mat2(Mat2 m)
 11 {                                                  11 {
 12     Matrix *mat = matrix_alloc(2, 2, matrix_fu     12     Matrix *mat = matrix_alloc(2, 2, matrix_full, float_v);
 13     float **el;                                    13     float **el;
 14     int     i, j;                                  14     int     i, j;
 15                                                    15 
 16     el = mat->el.float_v;                          16     el = mat->el.float_v;
 17     for (i = 0; i < 2; ++i)                        17     for (i = 0; i < 2; ++i)
 18         for (j = 0; j < 2; ++j)                    18         for (j = 0; j < 2; ++j)
 19             el[i][j] = m.el[i][j];                 19             el[i][j] = m.el[i][j];
 20     return (mat);                                  20     return (mat);
 21 }                                                  21 }
 22                                                    22 
 23 Mat2    mat2_matrix(Matrix * mat)                  23 Mat2    mat2_matrix(Matrix * mat)
 24 {                                                  24 {
 25     Mat2    m = {Mat2_id};                         25     Mat2    m = {Mat2_id};
 26     int     i, j;                                  26     int     i, j;
 27                                                    27 
 28     for (i = 0; i < 2; ++i)                        28     for (i = 0; i < 2; ++i)
 29         for (j = 0; j < 2; ++j)                    29         for (j = 0; j < 2; ++j)
 30             m.el[i][j] = matrix_getf(mat, i, j     30             m.el[i][j] = matrix_getf(mat, i, j);
 31     return (m);                                    31     return (m);
 32 }                                                  32 }
 33                                                    33 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.