summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-08-31 23:39:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-31 15:18:40 -0700
commite32896c2bc85a11c2eacc35c0267c2fa90d73b59 (patch)
treeca2fe52426f10e38311c9f083a1458d8fd3b213a /dive.h
parentbd8126a709f81631f949c374f4236861b519ea48 (diff)
downloadsubsurface-e32896c2bc85a11c2eacc35c0267c2fa90d73b59.tar.gz
Introduce double depth_to_bar()
as it leads to significant cleanup. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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 108e5d1ca..eac6e724d 100644
--- a/dive.h
+++ b/dive.h
@@ -419,6 +419,11 @@ static inline int depth_to_mbar(int depth, struct dive *dive)
return calculate_depth_to_mbar(depth, dive->surface_pressure, dive->salinity);
}
+static inline double depth_to_bar(int depth, struct dive *dive)
+{
+ return depth_to_mbar(depth, dive) / 1000.0;
+}
+
static inline double depth_to_atm(int depth, struct dive *dive)
{
return mbar_to_atm(depth_to_mbar(depth, dive));