1 #ifndef _GLES2N64_3DMATH_H
2 #define _GLES2N64_3DMATH_H
3 
4 #include <math.h>
5 #include <memory.h>
6 #include <string.h>
7 
8 #include <retro_inline.h>
9 
10 #include "../../Graphics/3dmath.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 void MultMatrix( float m0[4][4], float m1[4][4], float dest[4][4]);
17 
MultMatrix2(float m0[4][4],float m1[4][4])18 static INLINE void MultMatrix2( float m0[4][4], float m1[4][4] )
19 {
20     float dst[4][4];
21     MultMatrix(m0, m1, dst);
22     memcpy( m0, dst, sizeof(float) * 16 );
23 }
24 
Transpose3x3Matrix(float mtx[4][4])25 static INLINE void Transpose3x3Matrix( float mtx[4][4] )
26 {
27     float tmp = mtx[0][1];
28     mtx[0][1] = mtx[1][0];
29     mtx[1][0] = tmp;
30 
31     tmp = mtx[0][2];
32     mtx[0][2] = mtx[2][0];
33     mtx[2][0] = tmp;
34 
35     tmp = mtx[1][2];
36     mtx[1][2] = mtx[2][1];
37     mtx[2][1] = tmp;
38 }
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif
45 
46