Update num_to_range.md

Fixes #443
This commit is contained in:
Isabelle Viktoria Maciohsek
2021-04-05 18:25:46 +03:00
committed by GitHub
parent 4d7e2627ca
commit 4c07c3ceb0

View File

@ -9,7 +9,7 @@ Maps a number from one range to another range.
```py ```py
def num_to_range(num, inMin, inMax, outMin, outMax): def num_to_range(num, inMin, inMax, outMin, outMax):
return outMin(float(num - inMin) / float(inMax - inMin) * (outMax return outMin + (float(num - inMin) / float(inMax - inMin) * (outMax
- outMin)) - outMin))
``` ```