28 #include "vector_funcs.h"
30 #include "matrix_funcs.h"
33 #include "stream_funcs.h"
36 using namespace WF::Math;
40 template<const
int size>
43 cout <<
"Testing matrix: " << m << std::endl;
45 cout <<
"Transpose is: " << m.transpose() << std::endl;
49 double mdet = m.determinant(), minvdet = minv.determinant();
51 cout <<
"Inverse is: " << minv << std::endl;
53 assert(fabs(mdet * minvdet - 1) < WFMATH_EPSILON);
61 cout <<
"This should be zero: " << nothing << std::endl;
63 for(
int i = 0; i < size; ++i)
64 for(
int j = 0; j < size; ++j)
65 assert(fabs(nothing.elem(i, j)) < WFMATH_EPSILON);
80 m3.elem(0, 2) = WFMATH_CONST_SQRT2;
81 m3.elem(2, 0) = WFMATH_CONST_SQRT3;