helpers.h
Go to the documentation of this file.
1 #include <cmath>
2 #include <memory>
3 
4 // Basic make_unique helper function, similar to C++14 one
5 template <typename T, typename... Args>
6 std::unique_ptr<T> make_unique(Args&&... args) {
7  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
8 }
9 
10 // Degrees to radians
11 constexpr double deg2rad(double deg) { return deg * M_PI / 180.0; }
12 
13 // Radians to degrees
14 constexpr double rad2deg(double rad) { return rad * 180.0 / M_PI; }
constexpr double deg2rad(double deg)
Definition: helpers.h:11
constexpr double rad2deg(double rad)
Definition: helpers.h:14
std::unique_ptr< T > make_unique(Args &&...args)
Definition: helpers.h:6


fiducial_slam
Author(s): Jim Vaughan
autogenerated on Tue Jun 1 2021 03:03:29