mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Reduce ITCM RAM footprint considerably
This commit is contained in:
parent
1b12a7c76e
commit
3f823c7c6b
1 changed files with 2 additions and 2 deletions
|
@ -54,8 +54,8 @@ float sin_approx(float x)
|
|||
{
|
||||
// Wrap angle to 2π with range [-π π]
|
||||
x = fmodf(x, 2.0f * M_PIf);
|
||||
if (x <= -M_PIf) x += 2.0f * M_PIf;
|
||||
if (x > M_PIf) x -= 2.0f * M_PIf;
|
||||
while (x > M_PIf) x -= (2.0f * M_PIf); // always wrap input angle to -PI..PI
|
||||
while (x < -M_PIf) x += (2.0f * M_PIf);
|
||||
|
||||
// Use axis symmetry around x = ±π/2 for polynomial outside of range [-π/2 π/2]
|
||||
if (x > M_PIf / 2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue