Commit f084cf46 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[math] add angle conversion functions

parent d43b432c
......@@ -23,6 +23,8 @@
#ifndef FRACKIT_MATH_HH
#define FRACKIT_MATH_HH
#include <cmath>
#include <frackit/geometry/vector.hh>
#include <frackit/precision/precision.hh>
......@@ -71,6 +73,20 @@ bool isRightHandSystem(const Vector<ctype, 3>& v1,
return boxProduct(v1, v2, v3) > 0.0;
}
/*!
* \brief \todo TODO doc me.
*/
template<class ctype>
ctype toDegrees(const ctype radians)
{ return radians*180.0/M_PI; }
/*!
* \brief \todo TODO doc me.
*/
template<class ctype>
ctype toRadians(const ctype degrees)
{ return degrees*M_PI/180.0; }
} // end namespace Frackit
#endif // FRACKIT_MATH_HH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment