|
1 | 1 | # Summary
|
2 | 2 |
|
| 3 | +* [helpers](#modulino.helpers) |
| 4 | + * [map\_value](#modulino.helpers.map_value) |
| 5 | + * [map\_value\_int](#modulino.helpers.map_value_int) |
3 | 6 | * [movement](#modulino.movement)
|
4 | 7 | * [MovementValues](#modulino.movement.MovementValues)
|
5 | 8 | * [ModulinoMovement](#modulino.movement.ModulinoMovement)
|
|
113 | 116 | * [relative\_humidity](#modulino.thermo.ModulinoThermo.relative_humidity)
|
114 | 117 | * [temperature](#modulino.thermo.ModulinoThermo.temperature)
|
115 | 118 |
|
| 119 | +<a id="modulino.helpers.map_value"></a> |
| 120 | + |
| 121 | +### `map_value` |
| 122 | + |
| 123 | +```python |
| 124 | +def map_value(x: float | int, in_min: float | int, in_max: float | int, |
| 125 | + out_min: float | int, out_max: float | int) -> float | int |
| 126 | +``` |
| 127 | + |
| 128 | +Maps a value from one range to another. |
| 129 | + |
| 130 | +**Arguments**: |
| 131 | + |
| 132 | +- `x` - The value to map. |
| 133 | +- `in_min` - The minimum value of the input range. |
| 134 | +- `in_max` - The maximum value of the input range. |
| 135 | +- `out_min` - The minimum value of the output range. |
| 136 | +- `out_max` - The maximum value of the output range. |
| 137 | + |
| 138 | + |
| 139 | +**Returns**: |
| 140 | + |
| 141 | + The mapped value as a float or int depending on the input. |
| 142 | + |
| 143 | +<a id="modulino.helpers.map_value_int"></a> |
| 144 | + |
| 145 | +### `map_value_int` |
| 146 | + |
| 147 | +```python |
| 148 | +def map_value_int(x: float | int, in_min: float | int, in_max: float | int, |
| 149 | + out_min: float | int, out_max: float | int) -> int |
| 150 | +``` |
| 151 | + |
| 152 | +Maps a value from one range to another and returns an integer. |
| 153 | + |
| 154 | +**Arguments**: |
| 155 | + |
| 156 | +- `x` - The value to map. |
| 157 | +- `in_min` - The minimum value of the input range. |
| 158 | +- `in_max` - The maximum value of the input range. |
| 159 | +- `out_min` - The minimum value of the output range. |
| 160 | +- `out_max` - The maximum value of the output range. |
| 161 | + |
| 162 | + |
| 163 | +**Returns**: |
| 164 | + |
| 165 | + The mapped value as an integer. |
| 166 | + |
116 | 167 | <a id="modulino.movement.MovementValues"></a>
|
117 | 168 |
|
118 | 169 | ### `MovementValues`
|
|
0 commit comments