PX4 Firmware
PX4 Autopilot Software http://px4.io
matrixScalarMult.cpp
Go to the documentation of this file.
1 #include "test_macros.hpp"
2 
3 #include <matrix/math.hpp>
4 
5 using namespace matrix;
6 
7 int main()
8 {
9  float data[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
10  Matrix3f A(data);
11  A = A * 2;
12  float data_check[9] = {2, 4, 6, 8, 10, 12, 14, 16, 18};
13  Matrix3f A_check(data_check);
14  TEST(isEqual(A, A_check));
15  return 0;
16 }
17 
18 /* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */
int main()
bool isEqual(const Matrix< Type, M, N > &x, const Matrix< Type, M, N > &y, const Type eps=1e-4f)
Definition: Matrix.hpp:571
uint8_t * data
Definition: dataman.cpp:149
#define TEST(X)
Definition: test_macros.hpp:14