diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-08 08:26:04 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-08 08:26:04 +0100 |
commit | 74af4807a1a7adca0a6f6b6c668c48808ab858ec (patch) | |
tree | 35a327c10baff888f09e94af94febdb4706fa2d9 /src/lib/mathlib | |
parent | c118d17cb576b76df3bc1b765fb38c34421c7be4 (diff) | |
download | px4-firmware-74af4807a1a7adca0a6f6b6c668c48808ab858ec.tar.gz px4-firmware-74af4807a1a7adca0a6f6b6c668c48808ab858ec.tar.bz2 px4-firmware-74af4807a1a7adca0a6f6b6c668c48808ab858ec.zip |
Matrix.hpp: remove wrong and correct formatting changes which are not on master for clarity
Diffstat (limited to 'src/lib/mathlib')
-rw-r--r-- | src/lib/mathlib/math/Matrix.hpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/mathlib/math/Matrix.hpp b/src/lib/mathlib/math/Matrix.hpp index 68f0a777d..f6f4fc5ea 100644 --- a/src/lib/mathlib/math/Matrix.hpp +++ b/src/lib/mathlib/math/Matrix.hpp @@ -83,9 +83,10 @@ public: * trivial ctor * Initializes the elements to zero. */ - MatrixBase() : - data {}, - arm_mat {M, N, &data[0][0]} { + MatrixBase() : + data{}, + arm_mat{M, N, &data[0][0]} + { } virtual ~MatrixBase() {}; @@ -94,17 +95,20 @@ public: * copyt ctor */ MatrixBase(const MatrixBase<M, N> &m) : - arm_mat {M, N, &data[0][0]} { + arm_mat{M, N, &data[0][0]} + { memcpy(data, m.data, sizeof(data)); } MatrixBase(const float *d) : - arm_mat {M, N, &data[0][0]} { + arm_mat{M, N, &data[0][0]} + { memcpy(data, d, sizeof(data)); } - MatrixBase(const float d[M][N]) : - arm_mat {M, N, &data[0][0]} { + MatrixBase(const float d[M][N]) : + arm_mat{M, N, &data[0][0]} + { memcpy(data, d, sizeof(data)); } @@ -165,9 +169,8 @@ public: bool operator ==(const Matrix<M, N> &m) const { for (unsigned int i = 0; i < M; i++) for (unsigned int j = 0; j < N; j++) - if (data[i][j] != m.data[i][j]) { + if (data[i][j] != m.data[i][j]) return false; - } return true; } |