25 lines
456 B
C++
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; }
|