mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
use NOINLINE macro
This commit is contained in:
parent
0652e2d771
commit
ad2df49ee3
1 changed files with 3 additions and 3 deletions
|
@ -532,19 +532,19 @@ float fast_fsqrtf(const double value) {
|
||||||
#endif
|
#endif
|
||||||
if (isnan(ret))
|
if (isnan(ret))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// function to calculate the normalization (pythagoras) of a 2-dimensional vector
|
// 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));
|
return fast_fsqrtf(sq(firstElement) + sq(secondElement));
|
||||||
}
|
}
|
||||||
|
|
||||||
// function to calculate the normalization (pythagoras) of a 3-dimensional vector
|
// 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));
|
return fast_fsqrtf(sq(firstElement) + sq(secondElement) + sq(thirdElement));
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue