From cd34ab802d8daa0a5870156da5f34ae83dd243a7 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 24 May 2019 10:28:24 -0400 Subject: [PATCH] mathlib delete floorf in favor of math.h --- geo_lookup/geo_mag_declination.cpp | 2 +- mathlib/mathlib.cpp | 10 ---------- mathlib/mathlib.h | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/geo_lookup/geo_mag_declination.cpp b/geo_lookup/geo_mag_declination.cpp index 8f329f6c12e6..5ce4760966b7 100644 --- a/geo_lookup/geo_mag_declination.cpp +++ b/geo_lookup/geo_mag_declination.cpp @@ -46,10 +46,10 @@ #include +#include #include using math::constrain; -using math::floorf; /** set this always to the sampling in degrees for the table below */ static constexpr float SAMPLING_RES = 10.0f; diff --git a/mathlib/mathlib.cpp b/mathlib/mathlib.cpp index ca34a5569ca2..69aee15ffcea 100644 --- a/mathlib/mathlib.cpp +++ b/mathlib/mathlib.cpp @@ -70,16 +70,6 @@ float degrees(float radians) return (radians * 180.0f) / M_PI_F; } -int floorf(float input) -{ - int res = int(input); - if (res > input) { - res--; - } - - return res; -} - } // namespace math #endif /* ECL_STANDALONE */ diff --git a/mathlib/mathlib.h b/mathlib/mathlib.h index e22a8ee50896..04a180325773 100644 --- a/mathlib/mathlib.h +++ b/mathlib/mathlib.h @@ -60,7 +60,6 @@ float max(float val1, float val2); float constrain(float val, float min, float max); float radians(float degrees); float degrees(float radians); -int floorf(float input); } #else