1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 16:55:29 +03:00

use NOINLINE macro

This commit is contained in:
JuliooCesarMDM 2022-01-14 01:22:14 -03:00
parent 0652e2d771
commit ad2df49ee3

View file

@ -532,19 +532,19 @@ float fast_fsqrtf(const double value) {
#endif
if (isnan(ret))
{
return 0;
return 0.0f;
}
return ret;
}
// function to calculate the normalization (pythagoras) of a 2-dimensional vector
float calc_length_pythagorean_2D(const float firstElement, const float secondElement)
float NOINLINE calc_length_pythagorean_2D(const float firstElement, const float secondElement)
{
return fast_fsqrtf(sq(firstElement) + sq(secondElement));
}
// function to calculate the normalization (pythagoras) of a 3-dimensional vector
float calc_length_pythagorean_3D(const float firstElement, const float secondElement, const float thirdElement)
float NOINLINE calc_length_pythagorean_3D(const float firstElement, const float secondElement, const float thirdElement)
{
return fast_fsqrtf(sq(firstElement) + sq(secondElement) + sq(thirdElement));
}