X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=dive.h;h=e36839a1e90962a317d5a02676786f7f59f6f6a6;hb=d3feb78df5278f0f132875c60f33fdb2168087eb;hp=bbc5c67ae36413fead1c033f136e7685aa001d6c;hpb=e9d28901341d4cefb4c80a98239daaf81fb3d941;p=ext%2Fsubsurface.git diff --git a/dive.h b/dive.h index bbc5c67..e36839a 100644 --- a/dive.h +++ b/dive.h @@ -86,9 +86,14 @@ typedef struct { pressure_t start, end; } cylinder_t; +static inline double mm_to_feet(int mm) +{ + return mm * 0.00328084; +} + static inline int to_feet(depth_t depth) { - return depth.mm * 0.00328084 + 0.5; + return mm_to_feet(depth.mm) + 0.5; } static double mkelvin_to_C(int mkelvin)