|
template<typename T > |
static T | Clamp (T val, T min, T max) |
| Clamps a given value between the min and the max.
|
|
template<typename T > |
static T | Rescale (T val, T min0, T max0, T min1, T max1) |
| Rescales a value from [min0, max0] to [min1, max1].
|
|
template<typename T > |
static std::string | ToString (T val) |
| Converts a value to a string.
|
|
template<typename T > |
static int | Sign (T val) |
| Returns the sign of a value.
|
|
template<typename T > |
static T | Abs (T val) |
| takes the absolute value
|
|
template<typename T > |
static void | MinMaxMean (T val[], int n, T *minOut, T *maxOut, T *meanOut) |
| calculates the min, max and mean of an array
|
|
template<typename T > |
static T | AddDeadband (T raw, T deadbandSize) |
| Adds a deadband into the center of a range.
|
|
template<typename T > |
static T | ValWithAbsMax (T val1, T val2) |
| Returns value which has a higher absolute.
|
|
template<typename T > |
static T | Max (T val1, T val2) |
| Returns the higher value.
|
|
template<typename T > |
static T | Min (T val1, T val2) |
| Returns the lower value.
|
|
template<typename T > |
static T | MinAbs (T val1, T val2) |
| Returns the value with the lesser absolute value.
|
|
template<typename T > |
static T | PowPreseveSign (T val, int power) |
| Takes the exponent without changing the sign.
|
|
template<class A , class B > |
static bool | DeleteMapFirst (std::pair< A, B > x) |
| Frees the resources pointed to in a map<pointer, object>
|
|
template<class A , class B > |
static bool | DeleteMapSecond (std::pair< A, B > x) |
| Frees the resources pointed to in a map<object, pointer>
|
|
template<class A , class B > |
static bool | DeleteMapBoth (std::pair< A, B > x) |
| Frees the resources pointed to in a map<pointer, pointer>
|
|
template<class A > |
static bool | DeleteVector (A x) |
| Frees the resources pointed to in a vector<pointer>
|
|
static void | Die () |
| Kills the current process.
|
|
static void | Die (const char *message) |
| Kills the current process with an exit message.
|
|
static bool | Assert (bool test, const char *message) |
| Prints the message if the test fails.
|
|
Class containing utility functions.
- Author
- Robert Ying
-
Karthik Viswanathan
-
Brian Axelrod
-
David Giandomenico
-
Tony Peng
-
Raphael Chang
-
Manoj Vasishta