diff --git a/libraries/AP_Math/vector2.h b/libraries/AP_Math/vector2.h index bbe380aeb6..9e12b524bf 100644 --- a/libraries/AP_Math/vector2.h +++ b/libraries/AP_Math/vector2.h @@ -32,7 +32,7 @@ struct Vector2 // trivial ctor - Vector2() {} + Vector2(): x(0),y(0) {} // setting ctor Vector2(const T x0, const T y0): x(x0), y(y0) {} diff --git a/libraries/AP_Math/vector3.h b/libraries/AP_Math/vector3.h index 7c23a5fc63..39d9e31081 100644 --- a/libraries/AP_Math/vector3.h +++ b/libraries/AP_Math/vector3.h @@ -50,7 +50,7 @@ public: T x, y, z; // trivial ctor - Vector3() {} + Vector3(): x(0),y(0),z(0) {} // setting ctor Vector3(const T x0, const T y0, const T z0): x(x0), y(y0), z(z0) {}