normalizeAngleDeg methods
This commit is contained in:
@@ -157,6 +157,34 @@ inline PIVector<T> piAbs(const PIVector<T> & v) {
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void normalizeAngleDeg360(T & a) {
|
||||
while (a < 0.)
|
||||
a += 360.;
|
||||
while (a > 360.)
|
||||
a -= 360.;
|
||||
}
|
||||
template<typename T>
|
||||
double normalizedAngleDeg360(T a) {
|
||||
normalizeAngleDeg360(a);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void normalizeAngleDeg180(T & a) {
|
||||
while (a < -180.)
|
||||
a += 360.;
|
||||
while (a > 180.)
|
||||
a -= 360.;
|
||||
}
|
||||
template<typename T>
|
||||
double normalizedAngleDeg180(T a) {
|
||||
normalizeAngleDeg180(a);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
bool OLS_Linear(const PIVector<PIPair<T, T>> & input, T * out_a, T * out_b) {
|
||||
static_assert(std::is_arithmetic<T>::value, "Type must be arithmetic");
|
||||
|
||||
Reference in New Issue
Block a user