1
0
Fork 0
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:
Dominic Clifton 2014-04-17 19:37:56 +01:00
parent 41b5a01958
commit d7eb416aa9
5 changed files with 14 additions and 5 deletions

View file

@ -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;
}