Browse Source

add double precision alias declarations and remove typedefs

master
Daniel Agar 4 years ago
parent
commit
3679f7fd51
  1. 5
      matrix/AxisAngle.hpp
  2. 5
      matrix/Dcm.hpp
  3. 3
      matrix/Euler.hpp
  4. 11
      matrix/Quaternion.hpp
  5. 3
      matrix/Scalar.hpp
  6. 6
      matrix/SquareMatrix.hpp
  7. 2
      matrix/Vector.hpp
  8. 8
      matrix/Vector2.hpp
  9. 5
      matrix/Vector3.hpp

5
matrix/AxisAngle.hpp

@ -30,7 +30,7 @@ template<typename Type> @@ -30,7 +30,7 @@ template<typename Type>
class AxisAngle : public Vector<Type, 3>
{
public:
typedef Matrix<Type, 3, 1> Matrix31;
using Matrix31 = Matrix<Type, 3, 1>;
/**
* Constructor from array
@ -152,7 +152,8 @@ public: @@ -152,7 +152,8 @@ public:
}
};
typedef AxisAngle<float> AxisAnglef;
using AxisAnglef = AxisAngle<float>;
using AxisAngled = AxisAngle<double>;
} // namespace matrix

5
matrix/Dcm.hpp

@ -39,7 +39,7 @@ template<typename Type> @@ -39,7 +39,7 @@ template<typename Type>
class Dcm : public SquareMatrix<Type, 3>
{
public:
typedef Matrix<Type, 3, 1> Vector3;
using Vector3 = Matrix<Type, 3, 1>;
/**
* Standard constructor
@ -182,7 +182,8 @@ public: @@ -182,7 +182,8 @@ public:
}
};
typedef Dcm<float> Dcmf;
using Dcmf = Dcm<float>;
using Dcmd = Dcm<double>;
} // namespace matrix

3
matrix/Euler.hpp

@ -153,7 +153,8 @@ public: @@ -153,7 +153,8 @@ public:
};
typedef Euler<float> Eulerf;
using Eulerf = Euler<float>;
using Eulerd = Euler<double>;
} // namespace matrix

11
matrix/Quaternion.hpp

@ -53,8 +53,8 @@ template<typename Type> @@ -53,8 +53,8 @@ template<typename Type>
class Quaternion : public Vector<Type, 4>
{
public:
typedef Matrix<Type, 4, 1> Matrix41;
typedef Matrix<Type, 3, 1> Matrix31;
using Matrix41 = Matrix<Type, 4, 1>;
using Matrix31 = Matrix<Type, 3, 1>;
/**
* Constructor from array
@ -449,8 +449,11 @@ public: @@ -449,8 +449,11 @@ public:
}
};
typedef Quaternion<float> Quatf;
typedef Quaternion<float> Quaternionf;
using Quatf = Quaternion<float>;
using Quaternionf = Quaternion<float>;
using Quatd = Quaternion<double>;
using Quaterniond = Quaternion<double>;
} // namespace matrix

3
matrix/Scalar.hpp

@ -50,7 +50,8 @@ private: @@ -50,7 +50,8 @@ private:
};
typedef Scalar<float> Scalarf;
using Scalarf = Scalar<float>;
using Scalard = Scalar<double>;
} // namespace matrix

6
matrix/SquareMatrix.hpp

@ -266,7 +266,8 @@ public: @@ -266,7 +266,8 @@ public:
};
typedef SquareMatrix<float, 3> SquareMatrix3f;
using SquareMatrix3f = SquareMatrix<float, 3>;
using SquareMatrix3d = SquareMatrix<double, 3>;
template<typename Type, size_t M>
SquareMatrix<Type, M> eye() {
@ -535,7 +536,8 @@ SquareMatrix <Type, M> choleskyInv(const SquareMatrix<Type, M> & A) @@ -535,7 +536,8 @@ SquareMatrix <Type, M> choleskyInv(const SquareMatrix<Type, M> & A)
return L_inv.T()*L_inv;
}
typedef SquareMatrix<float, 3> Matrix3f;
using Matrix3f = SquareMatrix<float, 3>;
using Matrix3d = SquareMatrix<double, 3>;
} // namespace matrix

2
matrix/Vector.hpp

@ -20,7 +20,7 @@ template<typename Type, size_t M> @@ -20,7 +20,7 @@ template<typename Type, size_t M>
class Vector : public Matrix<Type, M, 1>
{
public:
typedef Matrix<Type, M, 1> MatrixM1;
using MatrixM1 = Matrix<Type, M, 1>;
Vector() = default;

8
matrix/Vector2.hpp

@ -21,8 +21,8 @@ class Vector2 : public Vector<Type, 2> @@ -21,8 +21,8 @@ class Vector2 : public Vector<Type, 2>
{
public:
typedef Matrix<Type, 2, 1> Matrix21;
typedef Vector<Type, 3> Vector3;
using Matrix21 = Matrix<Type, 2, 1>;
using Vector3 = Vector<Type, 3>;
Vector2() = default;
@ -71,7 +71,9 @@ public: @@ -71,7 +71,9 @@ public:
};
typedef Vector2<float> Vector2f;
using Vector2f = Vector2<float>;
using Vector2d = Vector2<double>;
} // namespace matrix

5
matrix/Vector3.hpp

@ -30,7 +30,7 @@ class Vector3 : public Vector<Type, 3> @@ -30,7 +30,7 @@ class Vector3 : public Vector<Type, 3>
{
public:
typedef Matrix<Type, 3, 1> Matrix31;
using Matrix31 = Matrix<Type, 3, 1>;
Vector3() = default;
@ -148,7 +148,8 @@ public: @@ -148,7 +148,8 @@ public:
};
typedef Vector3<float> Vector3f;
using Vector3f = Vector3<float>;
using Vector3d = Vector3<double>;
} // namespace matrix

Loading…
Cancel
Save