Program Listing for File angles.hpp
↰ Return to documentation for file (rcppsw/math/angles.hpp
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include "rcsw/common/compilers.h"
#include "rcppsw/math/degrees.hpp"
#include "rcppsw/math/radians.hpp"
#include "rcppsw/rcppsw.hpp"
/*******************************************************************************
* Namespaces/Decls
******************************************************************************/
namespace rcppsw::math {
/*******************************************************************************
* Free Functions
******************************************************************************/
degrees to_degrees(const radians& r) RCPPSW_PURE;
radians to_radians(const degrees& d) RCPPSW_PURE;
radians normalized_diff(const radians& angle1, const radians& angle2);
degrees normalized_diff(const degrees& angle1, const degrees& angle2);
template<typename TAngleType>
TAngleType abs(const TAngleType& angle) {
return TAngleType(std::fabs(angle.v()));
}
} /* namespace rcppsw::math */