diff options
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/axis.cc | 8 | ||||
-rw-r--r-- | src/math/axis.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/math/axis.cc b/src/math/axis.cc index aa35d92..e6442eb 100644 --- a/src/math/axis.cc +++ b/src/math/axis.cc @@ -91,17 +91,15 @@ void Axis::rotate(Vector3f const &normal, float angle) } } -/* -Axis const Axis::transpose() +Axis Axis::transpose() const { - Axis` t; + Axis t; for (size_t i = 0; i < 3; i++) for (size_t j = 0; j < 3; j++) - t.axis_vector[j][i] = axis_vector[j][i]; + t.axis_vector[i][j] = axis_vector[j][i]; return t; } -*/ // write an axis to a std::ostream std::ostream &operator<<(std::ostream & os, Axis const & axis) diff --git a/src/math/axis.h b/src/math/axis.h index 1422564..1396521 100644 --- a/src/math/axis.h +++ b/src/math/axis.h @@ -51,6 +51,9 @@ public: /// rotation about an arbitrary axis void rotate(Vector3f const &normal, float angle); + /// return the transpose of this matrix + Axis transpose() const; + private: Vector3f axis_vector[3]; }; |