mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 16:00:35 +08:00
Support more of mathlib function for easier swap in px4.
This commit is contained in:
@@ -21,6 +21,14 @@ int main()
|
||||
float data[] = {4, 5, 6};
|
||||
Vector3f f(data);
|
||||
TEST(isEqual(f, Vector3f(4, 5, 6)));
|
||||
|
||||
TEST(isEqual(a + b, Vector3f(1, 1, 0)));
|
||||
TEST(isEqual(a - b, Vector3f(1, -1, 0)));
|
||||
TEST(isEqualF(a * b, 0.0f));
|
||||
TEST(isEqual(-a, Vector3f(-1, 0, 0)));
|
||||
TEST(isEqual(a.unit(), a));
|
||||
TEST(isEqual(a.unit(), a.normalized()));
|
||||
TEST(isEqual(a*2.0, Vector3f(2, 0, 0)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user