Max ceiling precision

We used to round the ceilings for the individual tissues with
%.1f but the maximal (and thus effective) ceiling only with
%.0f. This makes no sense or be rounded up (to the conservative
side).

This commit shows also the maximal ceiling with higher accuracy.

Reported-by: Peter Hübner
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2021-03-01 10:02:02 +01:00
parent a72f2ac92d
commit 345959177f

View file

@ -1538,7 +1538,7 @@ static void plot_string(const struct dive *d, const struct plot_info *pi, int id
put_format(b, translate("gettextFromC", "Surface GF %.0f%%\n"), entry->surface_gf);
if (entry->ceiling) {
depthvalue = get_depth_units(entry->ceiling, NULL, &depth_unit);
put_format_loc(b, translate("gettextFromC", "Calculated ceiling %.0f%s\n"), depthvalue, depth_unit);
put_format_loc(b, translate("gettextFromC", "Calculated ceiling %.1f%s\n"), depthvalue, depth_unit);
if (prefs.calcalltissues) {
int k;
for (k = 0; k < 16; k++) {