aboutsummaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-21 12:12:54 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-21 12:12:54 -0700
commit515a9171523f7d8aa85f2caab262ba7d6320c33c (patch)
treed1f49227a67701bacbba0679839fcba0d7b8f9d0 /dive.h
parent184eecf7c0dbcbdecba097411828afaac30773aa (diff)
downloadsubsurface-515a9171523f7d8aa85f2caab262ba7d6320c33c.tar.gz
Add helper function for doing depth unit calculations
.. and use it for printing too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 85fdabf5d..fc458d04d 100644
--- a/dive.h
+++ b/dive.h
@@ -86,6 +86,8 @@ typedef struct {
pressure_t start, end;
} cylinder_t;
+extern double get_depth_units(unsigned int mm, int *frac, const char **units);
+
static inline double mm_to_feet(int mm)
{
return mm * 0.00328084;