core: remove to_feet() function

It wasn't used anywhere.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-09-03 16:06:19 +02:00 committed by bstoeger
parent 77b12bbccf
commit f09601bc93
2 changed files with 0 additions and 6 deletions

View file

@ -247,11 +247,6 @@ static inline long feet_to_mm(double feet)
return lrint(feet * 304.8);
}
static inline int to_feet(depth_t depth)
{
return int_cast<int>(mm_to_feet(depth.mm));
}
static inline double mkelvin_to_C(int mkelvin)
{
return (mkelvin - ZERO_C_IN_MKELVIN) / 1000.0;

View file

@ -11,7 +11,6 @@ void TestUnitConversion::testUnitConversions()
QCOMPARE(nearly_equal(cuft_to_l(1), 28.316847), true);
QCOMPARE(nearly_equal(mm_to_feet(1000), 3.280840), true);
QCOMPARE(feet_to_mm(1), 305L);
QCOMPARE(to_feet(depth_t{ .mm = 1'000}), 3);
QCOMPARE(nearly_equal(mkelvin_to_C(647000), 373.85), true);
QCOMPARE(nearly_equal(mkelvin_to_F(647000), 704.93), true);
QCOMPARE(F_to_mkelvin(704.93), 647000UL);