mirror of
https://github.com/elisspace/core.git
synced 2026-10-01 23:10:05 +00:00
12 lines
292 B
Python
12 lines
292 B
Python
"""Temperature util functions."""
|
|
|
|
|
|
def fahrenheit_to_celcius(fahrenheit):
|
|
"""Convert a Fahrenheit temperature to Celsius."""
|
|
return (fahrenheit - 32.0) / 1.8
|
|
|
|
|
|
def celcius_to_fahrenheit(celcius):
|
|
"""Convert a Celsius temperature to Fahrenheit."""
|
|
return celcius * 1.8 + 32.0
|