Corrige le sens du vent.
This commit is contained in:
30
main.py
30
main.py
@@ -74,27 +74,27 @@ def display_full(data):
|
|||||||
def diplay_wind_direction(degrees: float) -> str:
|
def diplay_wind_direction(degrees: float) -> str:
|
||||||
""" Retourne une fleche indicant la direction du vent"""
|
""" Retourne une fleche indicant la direction du vent"""
|
||||||
if 22.5 <= degrees < 67.5:
|
if 22.5 <= degrees < 67.5:
|
||||||
return '↗'
|
|
||||||
|
|
||||||
if 67.5 <= degrees < 112.5:
|
|
||||||
return '→'
|
|
||||||
|
|
||||||
if 112.5 <= degrees < 157.5:
|
|
||||||
return '↘'
|
|
||||||
|
|
||||||
if 157.5 <= degrees < 202.5:
|
|
||||||
return '↓'
|
|
||||||
|
|
||||||
if 202.5 <= degrees < 247.5:
|
|
||||||
return '↙'
|
return '↙'
|
||||||
|
|
||||||
if 247.5 <= degrees < 292.5:
|
if 67.5 <= degrees < 112.5:
|
||||||
return '←'
|
return '←'
|
||||||
|
|
||||||
if 292.5 <= degrees < 337.5:
|
if 112.5 <= degrees < 157.5:
|
||||||
return '↖'
|
return '↖'
|
||||||
|
|
||||||
return '↑'
|
if 157.5 <= degrees < 202.5:
|
||||||
|
return '↑'
|
||||||
|
|
||||||
|
if 202.5 <= degrees < 247.5:
|
||||||
|
return '↗'
|
||||||
|
|
||||||
|
if 247.5 <= degrees < 292.5:
|
||||||
|
return '→'
|
||||||
|
|
||||||
|
if 292.5 <= degrees < 337.5:
|
||||||
|
return '↘'
|
||||||
|
|
||||||
|
return '↓'
|
||||||
|
|
||||||
|
|
||||||
def coloring_temperature(temperature: float) -> str:
|
def coloring_temperature(temperature: float) -> str:
|
||||||
|
Reference in New Issue
Block a user