Initial commit of units.py
This commit is contained in:
parent
060d48e0cc
commit
35c8ee27b1
1 changed files with 16 additions and 0 deletions
16
lib/xmet/units.py
Normal file
16
lib/xmet/units.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import math
|
||||
|
||||
def deg(rad: float) -> float:
|
||||
return (rad * (180.0 / math.pi)) - 90
|
||||
|
||||
def rad(deg: float) -> float:
|
||||
return (deg + 90) * (math.pi / 180.0)
|
||||
|
||||
def knots(ms: float) -> float:
|
||||
return ms * 1.944
|
||||
|
||||
def kelvin(c: float) -> float:
|
||||
return 273.15 + c
|
||||
|
||||
def celsius(k: float) -> float:
|
||||
return k - 273.15
|
Loading…
Add table
Reference in a new issue