PX4 Firmware
PX4 Autopilot Software http://px4.io
upperRightTriangle.cpp
Go to the documentation of this file.
1
#include "
test_macros.hpp
"
2
#include <
matrix/math.hpp
>
3
4
using namespace
matrix
;
5
6
int
main
()
7
{
8
float
data
[9] = {1, 2, 3,
9
4, 5, 6,
10
7, 8, 10
11
};
12
float
urt[6] = {1, 2, 3, 5, 6, 10};
13
14
SquareMatrix<float, 3>
A(data);
15
16
for
(
size_t
i=0; i<6; i++) {
17
TEST
(fabs(urt[i] - A.
upper_right_triangle
()(i)) <
FLT_EPSILON
);
18
}
19
20
return
0;
21
}
22
23
/* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */
matrix::SquareMatrix
Definition:
SquareMatrix.hpp:26
FLT_EPSILON
#define FLT_EPSILON
Definition:
stdlib_imports.hpp:26
matrix
Definition:
AxisAngle.hpp:11
math.hpp
data
uint8_t * data
Definition:
dataman.cpp:149
test_macros.hpp
TEST
#define TEST(X)
Definition:
test_macros.hpp:14
main
int main()
Definition:
upperRightTriangle.cpp:6
matrix::SquareMatrix::upper_right_triangle
Vector< Type, M *(M+1)/2 > upper_right_triangle() const
Definition:
SquareMatrix.hpp:95
src
lib
matrix
test
upperRightTriangle.cpp
Generated by
1.8.13