18constexpr const T &
clamp(
const T &v,
const T &lo,
const T &hi) {
19 return std::less<T>{}(v, lo) ? lo : std::less<T>{}(hi, v) ? hi
44 return angle * 180.0 /
M_PI;
static constexpr double CIRCUMFERENCE
Circumference of the wheel.
Definition: encoder.h:67
#define M_PI
Define M_PI on ArmC6.
Definition: encoder.h:21
constexpr const T radiansToDegrees(const T &angle)
Convert radians to degree.
Definition: helper.h:43
constexpr const T & clamp(const T &v, const T &lo, const T &hi)
Clamp the value between [lo,high].
Definition: helper.h:18
constexpr const T speed_to_pps(const T &speed)
Convert m/s to pulse per sec(PPS).
Definition: helper.h:31