diff options
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -101,6 +101,13 @@ double get_volume_units(unsigned int ml, int *frac, const char **units) return vol; } +unsigned int units_to_depth(double depth) +{ + if (get_units()->length == METERS) + return rint(depth * 1000); + return feet_to_mm(depth); +} + double get_depth_units(unsigned int mm, int *frac, const char **units) { int decimals; |