Browse Source

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

this prevents differences between CPU types
master
Andrew Tridgell 13 years ago
parent
commit
62e92f406e
  1. 1
      libraries/AP_Math/AP_Math.h
  2. 8
      libraries/AP_Math/matrix3.h
  3. 10
      libraries/AP_Math/vector2.h
  4. 8
      libraries/AP_Math/vector3.h

1
libraries/AP_Math/AP_Math.h

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

8
libraries/AP_Math/matrix3.h

@ -126,10 +126,10 @@ public: @@ -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

10
libraries/AP_Math/vector2.h

@ -148,10 +148,10 @@ struct Vector2 @@ -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

8
libraries/AP_Math/vector3.h

@ -175,10 +175,10 @@ public: @@ -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

Loading…
Cancel
Save