Skip to content

Commit 10cd944

Browse files
committed
Make lint happy
1 parent 3bf083d commit 10cd944

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

simpleio.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,7 @@ def map_range(x, in_min, in_max, out_min, out_max):
265265
:return: Returns value mapped to new range
266266
:rtype: float
267267
"""
268-
t = (x-in_min) * (out_max - out_min) / (in_max-in_min) + out_min
268+
mapped = (x-in_min) * (out_max - out_min) / (in_max-in_min) + out_min
269269
if out_min <= out_max:
270-
return max(min(t, out_max), out_min)
271-
else:
272-
return min(max(t, out_max), out_min)
273-
270+
return max(min(mapped, out_max), out_min)
271+
return min(max(mapped, out_max), out_min)

0 commit comments

Comments
 (0)