mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 04:10:35 +08:00
EKF: remove dependecies and allow ekf to be built as standalone shared lib
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include "mathlib.h"
|
||||
|
||||
float math::constrain(float &val, float min, float max)
|
||||
{
|
||||
return (val < min) ? min : ((val > max) ? max : val);
|
||||
}
|
||||
float math::radians(float degrees)
|
||||
{
|
||||
return (degrees / 180.0f) * M_PI_F;
|
||||
}
|
||||
float math::degrees(float radians)
|
||||
{
|
||||
return (radians * 180.0f) / M_PI_F;
|
||||
}
|
||||
Reference in New Issue
Block a user