AP_Math: make out vector and matrix elements used types with fixed sizes

this prevents differences between CPU types
This commit is contained in:
Andrew Tridgell 2011-12-16 13:47:07 +11:00
parent 2fc25d963d
commit 62e92f406e
4 changed files with 14 additions and 13 deletions

View File

@ -2,6 +2,7 @@
// Assorted useful math operations for ArduPilot(Mega)
#include <stdint.h>
#include "vector2.h"
#include "vector3.h"
#include "matrix3.h"

View File

@ -126,10 +126,10 @@ public:
};
typedef Matrix3<int> Matrix3i;
typedef Matrix3<unsigned int> Matrix3ui;
typedef Matrix3<long> Matrix3l;
typedef Matrix3<unsigned long> Matrix3ul;
typedef Matrix3<int16_t> Matrix3i;
typedef Matrix3<uint16_t> Matrix3ui;
typedef Matrix3<int32_t> Matrix3l;
typedef Matrix3<uint32_t> Matrix3ul;
typedef Matrix3<float> Matrix3f;
#endif // MATRIX3_H

View File

@ -148,10 +148,10 @@ struct Vector2
};
typedef Vector2<int> Vector2i;
typedef Vector2<unsigned int> Vector2ui;
typedef Vector2<long> Vector2l;
typedef Vector2<unsigned long> Vector2ul;
typedef Vector2<float> Vector2f;
typedef Vector2<int16_t> Vector2i;
typedef Vector2<uint16_t> Vector2ui;
typedef Vector2<int32_t> Vector2l;
typedef Vector2<uint32_t> Vector2ul;
typedef Vector2<float> Vector2f;
#endif // VECTOR2_H

View File

@ -175,10 +175,10 @@ public:
};
typedef Vector3<int> Vector3i;
typedef Vector3<unsigned int> Vector3ui;
typedef Vector3<long> Vector3l;
typedef Vector3<unsigned long> Vector3ul;
typedef Vector3<int16_t> Vector3i;
typedef Vector3<uint16_t> Vector3ui;
typedef Vector3<int32_t> Vector3l;
typedef Vector3<uint32_t> Vector3ul;
typedef Vector3<float> Vector3f;
#endif // VECTOR3_H