mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
de-duplicate degrees to radians code.
Note, this also makes the operator precedence clearer.
This commit is contained in:
parent
41b5a01958
commit
d7eb416aa9
5 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "maths.h"
|
||||
|
@ -40,3 +41,9 @@ float devStandardDeviation(stdev_t *dev)
|
|||
{
|
||||
return sqrtf(devVariance(dev));
|
||||
}
|
||||
|
||||
float degreesToRadians(int16_t degrees)
|
||||
{
|
||||
return degrees * RAD;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue