diff --git a/src/main/common/maths.c b/src/main/common/maths.c index 9123d643e8..6c867d3c67 100644 --- a/src/main/common/maths.c +++ b/src/main/common/maths.c @@ -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)); } \ No newline at end of file