summaryrefslogtreecommitdiffstats
path: root/units.h
diff options
context:
space:
mode:
Diffstat (limited to 'units.h')
-rw-r--r--units.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/units.h b/units.h
index 90d7949b0..0baf2ffa5 100644
--- a/units.h
+++ b/units.h
@@ -119,6 +119,11 @@ typedef struct
int udeg;
} degrees_t;
+static inline double udeg_to_radians(int udeg)
+{
+ return (udeg * M_PI) / (1000000.0 * 180.0);
+}
+
static inline double grams_to_lbs(int grams)
{
return grams / 453.6;