RoboidControl-cpp/DiscreteAngle.h
Pascal Serrarens 273ebae33b Fixes
2024-03-05 10:17:29 +01:00

25 lines
456 B
C++

#ifndef DISCRETEANGLE_H
#define DISCRETEANGLE_H
#include "Range.h"
// A fixed angle between (-180..180]
template <typename T> class AngleUsing {
public:
AngleUsing(T sourceValue);
float ToFloat();
inline T GetValue() { return this->value; }
inline AngleUsing<T> operator-(AngleUsing<T> a) {
return this->value - a.value;
}
protected:
T value;
};
#endif
// template <typename T> inline float AngleUsing<T>::ToFloat() { return 0.0f; }