AP_Math: reorganize headers

Sort and add pragma once where needed.
This commit is contained in:
Lucas De Marchi 2016-05-02 18:39:03 -03:00
parent 6d3b491c02
commit ab1fa4b435
5 changed files with 15 additions and 15 deletions

View File

@ -1,25 +1,22 @@
#pragma once #pragma once
#include "definitions.h" #include <cmath>
#include <limits> #include <limits>
#include <stdint.h>
#include <type_traits> #include <type_traits>
#include <AP_Common/AP_Common.h> #include <AP_Common/AP_Common.h>
#include <AP_Param/AP_Param.h> #include <AP_Param/AP_Param.h>
#include <cmath>
#include <stdint.h>
#include "definitions.h"
#include "edc.h"
#include "location.h"
#include "matrix3.h"
#include "polygon.h"
#include "quaternion.h"
#include "rotations.h" #include "rotations.h"
#include "vector2.h" #include "vector2.h"
#include "vector3.h" #include "vector3.h"
#include "matrix3.h"
#include "quaternion.h"
#include "polygon.h"
#include "edc.h"
#include <AP_Param/AP_Param.h>
#include "location.h"
// define AP_Param types AP_Vector3f and Ap_Matrix3f // define AP_Param types AP_Vector3f and Ap_Matrix3f
AP_PARAMDEFV(Vector3f, Vector3f, AP_PARAM_VECTOR3F); AP_PARAMDEFV(Vector3f, Vector3f, AP_PARAM_VECTOR3F);

View File

@ -1,8 +1,8 @@
#pragma once #pragma once
#include <cmath> #include <cmath>
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
// Double precision math must be activated // Double precision math must be activated
#if defined(DBL_MATH) && CONFIG_HAL_BOARD == HAL_BOARD_LINUX #if defined(DBL_MATH) && CONFIG_HAL_BOARD == HAL_BOARD_LINUX

View File

@ -16,6 +16,9 @@
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
#include "vector2.h"
bool Polygon_outside(const Vector2l &P, const Vector2l *V, unsigned n); bool Polygon_outside(const Vector2l &P, const Vector2l *V, unsigned n);
bool Polygon_complete(const Vector2l *V, unsigned n); bool Polygon_complete(const Vector2l *V, unsigned n);

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once
// these rotations form a full set - every rotation in the following // these rotations form a full set - every rotation in the following
// list when combined with another in the list forms an entry which is // list when combined with another in the list forms an entry which is

View File

@ -51,12 +51,12 @@
#include <cmath> #include <cmath>
#include <float.h> #include <float.h>
#include <string.h> #include <string.h>
#if MATH_CHECK_INDEXES #if MATH_CHECK_INDEXES
#include <assert.h> #include <assert.h>
#endif #endif
#include "rotations.h"
template <typename T> template <typename T>
class Matrix3; class Matrix3;