From ee5c46eb45b853c179b7379c36682a053ff578d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 29 Sep 2019 06:00:08 +0300 Subject: [PATCH] add tools --- .gitignore | 1 + tools.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 tools.py diff --git a/.gitignore b/.gitignore index e59ab9a..df3e329 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ *.dwl *.dwl2 *.bak +__pycache__ diff --git a/tools.py b/tools.py new file mode 100644 index 0000000..1145e6a --- /dev/null +++ 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()