| 6 |
|
#include <sys/types.h> |
| 7 |
|
#include <sys/stat.h> |
| 8 |
|
|
| 9 |
– |
inline double roundMe( double x ){ |
| 10 |
– |
return ( x >= 0 ) ? floor( x + 0.5 ) : ceil( x - 0.5 ); |
| 11 |
– |
} |
| 12 |
– |
|
| 9 |
|
struct coords{ |
| 10 |
|
double pos[3]; // cartesian coords |
| 11 |
|
double q[4]; // the quanternions |
| 35 |
|
double matDet3(double a[3][3]); |
| 36 |
|
void invertMat3(double a[3][3], double b[3][3]); |
| 37 |
|
void matVecMul3(double m[3][3], double inVec[3], double outVec[3]); |
| 38 |
+ |
double roundMe(double x); |
| 39 |
|
|
| 40 |
|
int main(argc, argv) |
| 41 |
|
int argc; |
| 881 |
|
outVec[1] = m[1][0]*a0 + m[1][1]*a1 + m[1][2]*a2; |
| 882 |
|
outVec[2] = m[2][0]*a0 + m[2][1]*a1 + m[2][2]*a2; |
| 883 |
|
} |
| 884 |
+ |
|
| 885 |
+ |
double roundMe( double x ){ |
| 886 |
+ |
return ( x >= 0 ) ? floor( x + 0.5 ) : ceil( x - 0.5 ); |
| 887 |
+ |
} |