mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 18:00:35 +08:00
Vector2: add explicit constructor for Vector3
Initialize from the first 2 elements.
This commit is contained in:
@@ -29,6 +29,11 @@ int main()
|
||||
TEST(fabs(f(0) - 4) < 1e-5);
|
||||
TEST(fabs(f(1) - 5) < 1e-5);
|
||||
|
||||
Vector3f g(1.23f, 423.4f, 3221.f);
|
||||
Vector2f h(g);
|
||||
TEST(fabs(h(0) - 1.23f) < 1e-5);
|
||||
TEST(fabs(h(1) - 423.4f) < 1e-5);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user