diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-11-03 18:06:58 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-11-03 18:06:58 +0100 |
commit | ba0687bc5e471809ae311ef98f3ddda3c29713b4 (patch) | |
tree | 20e4b655bf9d77932ef415a5c2b261d2e9d56b95 /src/lib/mathlib/math | |
parent | 64c2165e8be17a8309594a0aeacec7f3aedee4c0 (diff) | |
download | px4-firmware-ba0687bc5e471809ae311ef98f3ddda3c29713b4.tar.gz px4-firmware-ba0687bc5e471809ae311ef98f3ddda3c29713b4.tar.bz2 px4-firmware-ba0687bc5e471809ae311ef98f3ddda3c29713b4.zip |
Matrix and Vector printing cleanup
Diffstat (limited to 'src/lib/mathlib/math')
-rw-r--r-- | src/lib/mathlib/math/arm/Matrix.hpp | 6 | ||||
-rw-r--r-- | src/lib/mathlib/math/arm/Vector.hpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/mathlib/math/arm/Matrix.hpp b/src/lib/mathlib/math/arm/Matrix.hpp index 715fd3a5e..1945bb02d 100644 --- a/src/lib/mathlib/math/arm/Matrix.hpp +++ b/src/lib/mathlib/math/arm/Matrix.hpp @@ -121,10 +121,10 @@ public: for (size_t i = 0; i < getRows(); i++) { for (size_t j = 0; j < getCols(); j++) { float sig; - int exp; + int exponent; float num = (*this)(i, j); - float2SigExp(num, sig, exp); - printf("%6.3fe%03.3d,", (double)sig, exp); + float2SigExp(num, sig, exponent); + printf("%6.3fe%03d ", (double)sig, exponent); } printf("\n"); diff --git a/src/lib/mathlib/math/arm/Vector.hpp b/src/lib/mathlib/math/arm/Vector.hpp index 4155800e8..52220fc15 100644 --- a/src/lib/mathlib/math/arm/Vector.hpp +++ b/src/lib/mathlib/math/arm/Vector.hpp @@ -109,10 +109,10 @@ public: inline void print() const { for (size_t i = 0; i < getRows(); i++) { float sig; - int exp; + int exponent; float num = (*this)(i); - float2SigExp(num, sig, exp); - printf("%6.3fe%03.3d,", (double)sig, exp); + float2SigExp(num, sig, exponent); + printf("%6.3fe%03d ", (double)sig, exponent); } printf("\n"); |