mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
22 lines
420 B
C++
22 lines
420 B
C++
#include <assert.h>
|
|
#include <stdio.h>
|
|
|
|
#include <matrix/math.hpp>
|
|
|
|
using namespace matrix;
|
|
|
|
int main()
|
|
{
|
|
float data[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
|
|
Matrix3f A(data);
|
|
A = A * 2;
|
|
float data_check[9] = {2, 4, 6, 8, 10, 12, 14, 16, 18};
|
|
Matrix3f A_check(data_check);
|
|
A.print();
|
|
A_check.print();
|
|
assert(A == A_check);
|
|
return 0;
|
|
}
|
|
|
|
/* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */
|