Go to the source code of this file.
|
float | bound (float val, float min, float max) |
| Bound a value in a range [min, max]. More...
|
|
float | map (float val, float input_lower_limit, float input_higher_limit, float output_lower_limit, float output_higher_limit) |
| Maps a value in range [input_lower_limit, input_higher_limit] to [output_lower_limit, output_higher_limit]. More...
|
|
◆ bound()
float bound |
( |
float |
val, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| |
Bound a value in a range [min, max].
- Parameters
-
val | value to be bound |
min | min value which the variable can take |
max | max value which the variable can take |
◆ map()
float map |
( |
float |
val, |
|
|
float |
input_lower_limit, |
|
|
float |
input_higher_limit, |
|
|
float |
output_lower_limit, |
|
|
float |
output_higher_limit |
|
) |
| |
Maps a value in range [input_lower_limit, input_higher_limit] to [output_lower_limit, output_higher_limit].
- Parameters
-
val | value to be mapped |
input_lower_limit | min value of val |
input_higher_limit | max value of val |
output_lower_limit | input_lower_limit is mapped to output_lower_limit |
output_higher_limit | input_higher_limit is mapped to output_higher_limit |