PX4 Firmware
PX4 Autopilot Software http://px4.io
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Functions
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
w
z
+
Variables
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
Typedefs
Enumerations
+
Enumerator
c
d
f
h
k
l
m
n
o
p
r
s
t
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
e
f
g
m
n
r
s
t
v
w
+
Enumerations
a
b
d
e
f
i
l
m
n
o
p
r
s
t
u
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
v
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
+
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
setIdentity.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
Matrix3f
A;
9
A.
setIdentity
();
10
11
for
(
size_t
i = 0; i < 3; i++) {
12
for
(
size_t
j = 0; j < 3; j++) {
13
if
(i == j) {
14
TEST
(fabs(A(i, j) - 1) <
FLT_EPSILON
);
15
16
}
else
{
17
TEST
(fabs(A(i, j) - 0) <
FLT_EPSILON
);
18
}
19
}
20
}
21
22
Matrix3f
B;
23
B.
identity
();
24
25
for
(
size_t
i = 0; i < 3; i++) {
26
for
(
size_t
j = 0; j < 3; j++) {
27
if
(i == j) {
28
TEST
(fabs(B(i, j) - 1) <
FLT_EPSILON
);
29
30
}
else
{
31
TEST
(fabs(B(i, j) - 0) <
FLT_EPSILON
);
32
}
33
}
34
}
35
36
return
0;
37
}
38
39
/* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */
main
int main()
Definition:
setIdentity.cpp:6
matrix::SquareMatrix
Definition:
SquareMatrix.hpp:26
FLT_EPSILON
#define FLT_EPSILON
Definition:
stdlib_imports.hpp:26
matrix
Definition:
AxisAngle.hpp:11
matrix::Matrix::setIdentity
void setIdentity()
Definition:
Matrix.hpp:447
math.hpp
test_macros.hpp
TEST
#define TEST(X)
Definition:
test_macros.hpp:14
matrix::Matrix::identity
void identity()
Definition:
Matrix.hpp:457
src
lib
matrix
test
setIdentity.cpp
Generated by
1.8.13