diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:41:41 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:41:41 -0800 |
commit | 08284275e733fcea8b909b86fda503d4b24e0b84 (patch) | |
tree | b2092172f09044d58efdae479447bae9b6c824ad /core/deco.c | |
parent | b8b858a9d299877969527ef5b3c4bde97bb86d05 (diff) | |
parent | 2b06a0b2234cf2779f80e87038011067be282bcb (diff) | |
download | subsurface-08284275e733fcea8b909b86fda503d4b24e0b84.tar.gz |
Merge branch 'master' of https://github.com/dje29/subsurface
Diffstat (limited to 'core/deco.c')
-rw-r--r-- | core/deco.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/deco.c b/core/deco.c index d2678a922..88585c98d 100644 --- a/core/deco.c +++ b/core/deco.c @@ -622,10 +622,10 @@ int deco_allowed_depth(double tissues_tolerance, double surface_pressure, struct /* Avoid negative depths */ pressure_delta = tissues_tolerance > surface_pressure ? tissues_tolerance - surface_pressure : 0.0; - depth = rel_mbar_to_depth(pressure_delta * 1000, dive); + depth = rel_mbar_to_depth(lrint(pressure_delta * 1000), dive); if (!smooth) - depth = ceil(depth / DECO_STOPS_MULTIPLIER_MM) * DECO_STOPS_MULTIPLIER_MM; + depth = lrint(ceil(depth / DECO_STOPS_MULTIPLIER_MM) * DECO_STOPS_MULTIPLIER_MM); if (depth > 0 && depth < buehlmann_config.last_deco_stop_in_mtr * 1000) depth = buehlmann_config.last_deco_stop_in_mtr * 1000; |