|
Haptic Controller
|
Go to the source code of this file.
Classes | |
| struct | Limits< T > |
| Limit struct to store upper and lower limits. More... | |
Functions | |
| bool | float_close_compare (float a, float b, float tol=1e-6) |
| Compare two floats for equality under a tolerance. | |
| template<typename T > | |
| T | limit (T input, const T max_value, const std::optional< T >(min_value)=std::nullopt) |
| Clamps an input value to a. | |
| template<typename T > | |
| T | limit (T input, Limits< T > limits) |
| Special case of the limit function accepting a Limit struct instead. | |
| bool float_close_compare | ( | float | a, |
| float | b, | ||
| float | tol = 1e-6 ) |
Compare two floats for equality under a tolerance.
| a | - The first float |
| b | - The second float |
| tol | - The acceptable tolerance, defaults to 1e-6 |
Definition at line 13 of file helpers.hpp.
Referenced by isSynced().
| T limit | ( | T | input, |
| const T | max_value, | ||
| const std::optional< T > | min_value = std::nullopt ) |
Clamps an input value to a.
| T | - The type of the value to be limited |
| input | - The variable to limit. |
| max_value | - The maximum value to limit. If no other value is provided, the negative of this is assumed the minimum value. |
| min_value | - The minimum value to limit. Defaults to nullopt and uses the negative of the maximum value. |
Definition at line 25 of file helpers.hpp.
Referenced by endEffMirrorUpdate(), jointMirrorUpdate(), and limit().
| T limit | ( | T | input, |
| Limits< T > | limits ) |
Special case of the limit function accepting a Limit struct instead.
| T | - The type of the input |
| input | - The value to input. |
| limits | - The limit struct. |
Definition at line 58 of file helpers.hpp.
References limit(), Limits< T >::lower, and Limits< T >::upper.