Skip to content

Commit

Permalink
mathlib delete floorf in favor of math.h
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and priseborough committed May 28, 2019
1 parent 340d85a commit cd34ab8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion geo_lookup/geo_mag_declination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@

#include <mathlib/mathlib.h>

#include <math.h>
#include <stdint.h>

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;
Expand Down
10 changes: 0 additions & 10 deletions mathlib/mathlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
1 change: 0 additions & 1 deletion mathlib/mathlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd34ab8

Please sign in to comment.