lego: Implement/match CalculateNewVel (#66)

* lego: Implement/match CalculateNewVel

* remove braces

* consistency
This commit is contained in:
Christian Semmler
2023-07-01 01:24:46 +02:00
committed by GitHub
parent 428b5ae8db
commit d7b8d6463b
4 changed files with 43 additions and 16 deletions

View File

@@ -7,4 +7,16 @@ inline T Abs(T p_t)
return p_t < 0 ? -p_t : p_t;
}
template <class T>
inline T Min(T p_t1, T p_t2)
{
return p_t1 < p_t2 ? p_t1 : p_t2;
}
template <class T>
inline T Max(T p_t1, T p_t2)
{
return p_t1 > p_t2 ? p_t1 : p_t2;
}
#endif // LEGOUTIL_H