| 41 | /** normalizes an Value between [-Limit Limit] */ |
| 42 | template <typename T> |
| 43 | T NormalizeCustom(const T &Value, const double Limit) |
| 44 | { |
| 45 | T ValueWrapped = Value; |
| 46 | while (ValueWrapped > Limit) |
| 47 | { |
| 48 | ValueWrapped -= 2*Limit; |
| 49 | } |
| 50 | while (ValueWrapped < -Limit) |
| 51 | { |
| 52 | ValueWrapped += 2*Limit; |
| 53 | } |
| 54 | |
| 55 | return ValueWrapped; |
| 56 | } |
| 57 | |
| 58 | template <typename T, int Dim> |
| 59 | VectorT<T, Dim> NormalizeCustomVector(const VectorT<T, Dim> &Vector, const double Limit) |
no outgoing calls
no test coverage detected