Skip to content

Commit

Permalink
increase dew point range
Browse files Browse the repository at this point in the history
  • Loading branch information
CedarGroveStudios committed Dec 14, 2022
1 parent 3ff1f4f commit 089a1e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cedargrove_temperaturetools/dew_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def dew_point(deg_c, humidity, verbose=False):
"""Calculate dew point temperature from measured temperature (Celsius) and
humidity (percent). Returns the calculated dew point (Celsius) and summary
description. Detailed description is provided if verbose=True. Dew point
value is constrained to the range of 0 to 40 (Celsius).
value is constrained to the range of -10 to 40 (Celsius).
:param float deg_c: The temperature in Celsius. No default.
:param float humidity: The humidity in the range of 0 to 100
Expand All @@ -67,8 +67,8 @@ def dew_point(deg_c, humidity, verbose=False):
2,
)

# Constrain dew_point to range of 0 to 40 degrees Celsius
dew_point_c = min(max(dew_point_c, 0), 40)
# Constrain dew_point to range of -10 to 40 degrees Celsius
dew_point_c = min(max(dew_point_c, -10), 40)

# Select message from list
for _, (_, maximum, summary, detail) in enumerate(BREAKPOINTS):
Expand Down

0 comments on commit 089a1e6

Please sign in to comment.