commit ee5c46eb45b853c179b7379c36682a053ff578d1 (tree) parent f9e8faca938791abf0a6c80313fb7eae43bc96a9 Author: Motiejus Jakštys <desired.mta@gmail.com> Date: Sun, 29 Sep 2019 06:00:08 +0300 add tools Diffstat:
| M | .gitignore | | | 1 | + |
| A | tools.py | | | 7 | +++++++ |
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -13,3 +13,4 @@ *.dwl *.dwl2 *.bak +__pycache__ diff --git a/tools.py b/tools.py @@ -0,0 +1,7 @@ + +from decimal import Decimal + +def deg(deg, mm, ss): + return (Decimal(deg) + + Decimal(mm) / Decimal(60) + + Decimal(ss) / Decimal(3600)).normalize()