mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-06 09:11:07 +08:00
Remove direct access to internal data
This commit is contained in:
1 parent
18218c8f9c
commit
51d2f9f0dc
5 files changed
+18
-28
No files matched your search
@@ -8,13 +8,6 @@ int main()
|
||||
float data[9] = {1, 0, 0, 0, 1, 0, 1, 0, 1};
|
||||
Matrix3f A(data);
|
||||
|
||||
const Matrix3f Const(data);
|
||||
const float * raw_data = Const.data();
|
||||
const float eps = 1e-4f;
|
||||
for (int i=0; i<9; i++) {
|
||||
TEST(fabs(raw_data[i] - data[i]) < eps);
|
||||
}
|
||||
|
||||
float data_check[9] = {1, 0, 0, 0, 1, 0, -1, 0, 1};
|
||||
Matrix3f A_I(data_check);
|
||||
Matrix3f I;
|
||||
|
||||
Reference in new issue
Block a user