Skip to content

Commit f1ed6bb

Browse files
sebromeroactions-user
authored andcommitted
Update documentation
1 parent fbaeef9 commit f1ed6bb

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

docs/api.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Summary
22

3+
* [helpers](#modulino.helpers)
4+
* [map\_value](#modulino.helpers.map_value)
5+
* [map\_value\_int](#modulino.helpers.map_value_int)
36
* [movement](#modulino.movement)
47
* [MovementValues](#modulino.movement.MovementValues)
58
* [ModulinoMovement](#modulino.movement.ModulinoMovement)
@@ -113,6 +116,54 @@
113116
* [relative\_humidity](#modulino.thermo.ModulinoThermo.relative_humidity)
114117
* [temperature](#modulino.thermo.ModulinoThermo.temperature)
115118

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+
116167
<a id="modulino.movement.MovementValues"></a>
117168

118169
### `MovementValues`

0 commit comments

Comments
 (0)