Un-inlined get_table_data

This commit is contained in:
Alexander Lerach 2024-11-14 15:20:47 +01:00 committed by Daniel Agar
parent 6d0b7f7ed1
commit b6daf83088

View File

@ -53,7 +53,7 @@
using math::constrain;
static constexpr unsigned get_lookup_table_index(float *val, float min, float max)
static unsigned get_lookup_table_index(float *val, float min, float max)
{
/* for the rare case of hitting the bounds exactly
* the rounding logic wouldn't fit, so enforce it.
@ -66,7 +66,7 @@ static constexpr unsigned get_lookup_table_index(float *val, float min, float ma
return static_cast<unsigned>((-(min) + *val) / SAMPLING_RES);
}
static constexpr float get_table_data(float latitude_deg, float longitude_deg, const int16_t table[LAT_DIM][LON_DIM])
static float get_table_data(float latitude_deg, float longitude_deg, const int16_t table[LAT_DIM][LON_DIM])
{
latitude_deg = math::constrain(latitude_deg, SAMPLING_MIN_LAT, SAMPLING_MAX_LAT);