mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Round gas depth properly
The D in MOD, EAD, END, and EADD stands for "depth" and as such these should be mm in int rather than double. The intermediate fn2 and fhe2, however, as intermediate value should not be rounded to an integer. The upshot of this is a litle more numerical stability. It should lead to more stable values in TestProfile when run on architectures with different floating point precision. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
cbe6d89767
commit
9fd531dcc5
7 changed files with 31237 additions and 31232 deletions
|
|
@ -102,6 +102,7 @@ extern fraction_t best_he(depth_t depth, const struct dive *dive, bool o2narcoti
|
|||
|
||||
extern int get_surface_pressure_in_mbar(const struct dive *dive, bool non_null);
|
||||
extern int depth_to_mbar(int depth, const struct dive *dive);
|
||||
extern double depth_to_mbarf(int depth, const struct dive *dive);
|
||||
extern double depth_to_bar(int depth, const struct dive *dive);
|
||||
extern double depth_to_atm(int depth, const struct dive *dive);
|
||||
extern int rel_mbar_to_depth(int mbar, const struct dive *dive);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue