mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bd8126a709
commit
e32896c2bc
4 changed files with 30 additions and 25 deletions
5
dive.h
5
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue