summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 42c09b581..30218f84e 100644
--- a/dive.h
+++ b/dive.h
@@ -156,6 +156,11 @@ static inline unsigned long F_to_mkelvin(double f)
return (f-32) * 1000 / 1.8 + 273150.5;
}
+static inline unsigned long C_to_mkelvin(double c)
+{
+ return c * 1000 + 273150.5;
+}
+
static inline int to_C(temperature_t temp)
{
if (!temp.mkelvin)