vecmat3.h

This commit is contained in:
Jiri Pittner 2024-01-18 14:38:02 +01:00
parent 764baa3201
commit 8f61a5d208

View File

@ -178,7 +178,7 @@ public:
void transposeme(); void transposeme();
const Mat3 transpose() const {Mat3 r(*this); r.transposeme(); return r;}; const Mat3 transpose() const {Mat3 r(*this); r.transposeme(); return r;};
const Mat3 inverse(T *det = NULL) const; const Mat3 inverse(T *det = NULL) const;
const Vec3<T> linear_solve(const Vec3<T> &rhs, T *det = NULL) const; const Vec3<T> linear_solve(const Vec3<T> &rhs, T *det = NULL) const; //alternative to simple_gaussj in simple.h
//C-style IO //C-style IO
int fprintf(FILE *f, const char *format) const {int n= ::fprintf(f,format,q[0][0],q[0][1],q[0][2]); n+=::fprintf(f,format,q[1][0],q[1][1],q[1][2]); n+=::fprintf(f,format,q[2][0],q[2][1],q[2][2]); return n;}; int fprintf(FILE *f, const char *format) const {int n= ::fprintf(f,format,q[0][0],q[0][1],q[0][2]); n+=::fprintf(f,format,q[1][0],q[1][1],q[1][2]); n+=::fprintf(f,format,q[2][0],q[2][1],q[2][2]); return n;};
int fscanf(FILE *f, const char *format) const {return ::fscanf(f,format,q[0][0],q[0][1],q[0][2]) + ::fscanf(f,format,q[1][0],q[1][1],q[1][2]) + ::fscanf(f,format,q[2][0],q[2][1],q[2][2]);}; int fscanf(FILE *f, const char *format) const {return ::fscanf(f,format,q[0][0],q[0][1],q[0][2]) + ::fscanf(f,format,q[1][0],q[1][1],q[1][2]) + ::fscanf(f,format,q[2][0],q[2][1],q[2][2]);};