#ifndef TOOLS_HXX #define TOOLS_HXX #include #define uge_gm_tmpl_mn template uge_gm_tmpl_mn MatrixMxN Tools::normalizeAngle(const MatrixMxN &rotation) { MatrixMxN other; for (int i = 0; i < M; ++i) { for (int j = 0; j < N; ++j) { other.setScalar(i, j, normalizeAngle(rotation.getScalar(i))); } } return other; } uge_gm_tmpl_mn MatrixMxN Tools::radToDegree(const MatrixMxN &rotation) { return rotation * MatrixMxN(180.0 / M_PI); } uge_gm_tmpl_mn MatrixMxN Tools::degreeToRad(const MatrixMxN &rotation) { return rotation * MatrixMxN(M_PI / 180.0); } #endif // TOOLS_HXX