MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / NormalizeCustom

Function NormalizeCustom

include/NormalizeAngle.h:43–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 3

NormalizeCustomVectorFunction · 0.85
NormalizeAngleFunction · 0.85
NormalizeAngleVelocityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected