mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add helper function for doing depth unit calculations
.. and use it for printing too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
184eecf7c0
commit
515a917152
4 changed files with 37 additions and 17 deletions
2
dive.h
2
dive.h
|
@ -86,6 +86,8 @@ typedef struct {
|
|||
pressure_t start, end;
|
||||
} cylinder_t;
|
||||
|
||||
extern double get_depth_units(unsigned int mm, int *frac, const char **units);
|
||||
|
||||
static inline double mm_to_feet(int mm)
|
||||
{
|
||||
return mm * 0.00328084;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue