mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-21 15:25:29 +03:00
Tidy blackbox code
This commit is contained in:
parent
96ea83cba0
commit
b9d8f109ce
3 changed files with 56 additions and 61 deletions
|
@ -97,6 +97,15 @@ float acos_approx(float x)
|
|||
}
|
||||
#endif
|
||||
|
||||
int gcd(int num, int denom)
|
||||
{
|
||||
if (denom == 0) {
|
||||
return num;
|
||||
}
|
||||
|
||||
return gcd(denom, num % denom);
|
||||
}
|
||||
|
||||
int32_t wrap_18000(int32_t angle)
|
||||
{
|
||||
if (angle > 18000)
|
||||
|
@ -475,4 +484,4 @@ uint8_t crc8_dvb_s2(uint8_t crc, unsigned char a)
|
|||
float bellCurve(const float x, const float curveWidth)
|
||||
{
|
||||
return powf(M_Ef, -sq(x) / (2.0f * sq(curveWidth)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue