added von mises distributionb

quick&dirty: added activity to the grid-walkers
This commit is contained in:
2016-04-21 08:59:05 +02:00
parent a00f2cf80a
commit f77a28735b
11 changed files with 216 additions and 11 deletions

20
math/Math.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef K_MATH_MATH_H
#define K_MATH_MATH_H
#include "../Defines.h"
class Math {
public:
/** ensure val stays within [min:max] */
template <typename Scalar> static inline Scalar clamp(const Scalar min, const Scalar max, const Scalar val) {
if (unlikely(val < min)) {return min;}
if (unlikely(val > max)) {return max;}
return val;
}
};
#endif // K_MATH_MATH_H