diff --git a/matrix/SquareMatrix.hpp b/matrix/SquareMatrix.hpp index 931bbb94a8..6dd138dda8 100644 --- a/matrix/SquareMatrix.hpp +++ b/matrix/SquareMatrix.hpp @@ -36,7 +36,7 @@ public: { } - SquareMatrix(const Matrix &other) : + SquareMatrix(const Matrix &other) : Matrix(other) { } @@ -176,16 +176,16 @@ public: return res; } - SquareMatrix expm(float dt, size_t n) const + SquareMatrix expm(Type dt, size_t n) const { - SquareMatrix res; + SquareMatrix res; res.setIdentity(); - SquareMatrix A_pow = *this; + SquareMatrix A_pow = *this; size_t k_fact = 1; size_t k = 1; while (k < n) { - res += A_pow * (float(pow(dt, k)) / k_fact); + res += A_pow * (Type(pow(dt, k)) / k_fact); if (k == n) { break;