mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 04:33:33 +08:00
Correct deg to rad conversion inversion. Add additional functionality to mathlib to allow standalone compile without Limits.cpp and Limits.hpp files from PX4.
This commit is contained in:
+8
-3
@@ -41,18 +41,23 @@
|
||||
#ifndef MATHLIB_H
|
||||
#define MATHLIB_H
|
||||
#ifdef POSIX_SHARED
|
||||
#include <Eigen/Dense>
|
||||
#include <algorithm>
|
||||
// #include <Eigen/Dense>
|
||||
// #include <algorithm>
|
||||
// #include "Limits.hpp"
|
||||
#define M_PI_F 3.14159265358979323846f
|
||||
#define constexpr
|
||||
|
||||
namespace math
|
||||
{
|
||||
using namespace Eigen;
|
||||
// using namespace Eigen;
|
||||
using namespace std;
|
||||
|
||||
float min(float val1, float val2);
|
||||
float max(float val1, float val2);
|
||||
float constrain(float &val, float min, float max);
|
||||
float radians(float degrees);
|
||||
float degrees(float radians);
|
||||
|
||||
}
|
||||
#else
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
Reference in New Issue
Block a user