From 5b0ea675c33b3e0a882f491b97a0f0a3c51a338d Mon Sep 17 00:00:00 2001 From: jgoppert Date: Thu, 5 Nov 2015 11:23:54 -0500 Subject: [PATCH] Fixed float in square matrix. --- matrix/SquareMatrix.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;