aboutsummaryrefslogtreecommitdiffstats
path: root/core/units.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-11 08:41:41 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-11 08:41:41 -0800
commit08284275e733fcea8b909b86fda503d4b24e0b84 (patch)
treeb2092172f09044d58efdae479447bae9b6c824ad /core/units.h
parentb8b858a9d299877969527ef5b3c4bde97bb86d05 (diff)
parent2b06a0b2234cf2779f80e87038011067be282bcb (diff)
downloadsubsurface-08284275e733fcea8b909b86fda503d4b24e0b84.tar.gz
Merge branch 'master' of https://github.com/dje29/subsurface
Diffstat (limited to 'core/units.h')
-rw-r--r--core/units.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/units.h b/core/units.h
index c751328f1..f2557ed22 100644
--- a/core/units.h
+++ b/core/units.h
@@ -134,7 +134,7 @@ static inline double grams_to_lbs(int grams)
static inline int lbs_to_grams(double lbs)
{
- return rint(lbs * 453.6);
+ return lrint(lbs * 453.6);
}
static inline double ml_to_cuft(int ml)
@@ -159,12 +159,12 @@ static inline double m_to_mile(int m)
static inline unsigned long feet_to_mm(double feet)
{
- return rint(feet * 304.8);
+ return lrint(feet * 304.8);
}
static inline int to_feet(depth_t depth)
{
- return rint(mm_to_feet(depth.mm));
+ return lrint(mm_to_feet(depth.mm));
}
static inline double mkelvin_to_C(int mkelvin)
@@ -179,12 +179,12 @@ static inline double mkelvin_to_F(int mkelvin)
static inline unsigned long F_to_mkelvin(double f)
{
- return rint((f - 32) * 1000 / 1.8 + ZERO_C_IN_MKELVIN);
+ return lrint((f - 32) * 1000 / 1.8 + ZERO_C_IN_MKELVIN);
}
static inline unsigned long C_to_mkelvin(double c)
{
- return rint(c * 1000 + ZERO_C_IN_MKELVIN);
+ return lrint(c * 1000 + ZERO_C_IN_MKELVIN);
}
static inline double psi_to_bar(double psi)
@@ -194,12 +194,12 @@ static inline double psi_to_bar(double psi)
static inline long psi_to_mbar(double psi)
{
- return rint(psi_to_bar(psi) * 1000);
+ return lrint(psi_to_bar(psi) * 1000);
}
static inline int to_PSI(pressure_t pressure)
{
- return rint(pressure.mbar * 0.0145037738);
+ return lrint(pressure.mbar * 0.0145037738);
}
static inline double bar_to_atm(double bar)