core: move *_to_depth() functions into struct dive

Seems logical in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-20 22:47:16 +02:00 committed by bstoeger
parent bf84d66df2
commit bdd5527005
6 changed files with 29 additions and 29 deletions

View file

@ -551,7 +551,7 @@ int deco_allowed_depth(double tissues_tolerance, double surface_pressure, const
/* Avoid negative depths */
pressure_delta = tissues_tolerance > surface_pressure ? tissues_tolerance - surface_pressure : 0.0;
depth = rel_mbar_to_depth(lrint(pressure_delta * 1000), dive);
depth = dive->rel_mbar_to_depth(lrint(pressure_delta * 1000));
if (!smooth)
depth = lrint(ceil(depth / DECO_STOPS_MULTIPLIER_MM) * DECO_STOPS_MULTIPLIER_MM);