diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-06-13 11:54:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-13 21:08:11 -0700 |
commit | 7a594e3ec5e66f30a1604d492f3bb1af1259afd7 (patch) | |
tree | b0fb86b70ad06b5386db0518d1d70df07c54bfe3 /units.h | |
parent | 9ec155fad05d53aaac42c7a8b9460b7eb6a0c803 (diff) | |
download | subsurface-7a594e3ec5e66f30a1604d492f3bb1af1259afd7.tar.gz |
Simplify distance calculations
This simplifies the distance calculations and removes a dependency.
This version uses propper math instead of my to simple previous version.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'units.h')
-rw-r--r-- | units.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -119,6 +119,11 @@ typedef struct int udeg; } degrees_t; +static inline double udeg_to_radians(int udeg) +{ + return (udeg * M_PI) / (1000000.0 * 180.0); +} + static inline double grams_to_lbs(int grams) { return grams / 453.6; |