diff --git a/libraries/AP_Math/vector3.cpp b/libraries/AP_Math/vector3.cpp index bffb48b1b55..72ea1e961a3 100644 --- a/libraries/AP_Math/vector3.cpp +++ b/libraries/AP_Math/vector3.cpp @@ -82,7 +82,7 @@ void Vector3::rotate(enum Rotation rotation) } case ROTATION_ROLL_180_YAW_135: { tmp = HALF_SQRT_2*(y - x); - y = HALF_SQRT_2*(y + x); + y = HALF_SQRT_2*(y + x); x = tmp; z = -z; return; } @@ -92,7 +92,7 @@ void Vector3::rotate(enum Rotation rotation) } case ROTATION_ROLL_180_YAW_225: { tmp = -HALF_SQRT_2*(x + y); - y = HALF_SQRT_2*(y - x); + y = HALF_SQRT_2*(y - x); x = tmp; z = -z; return; } @@ -102,7 +102,7 @@ void Vector3::rotate(enum Rotation rotation) } case ROTATION_ROLL_180_YAW_315: { tmp = HALF_SQRT_2*(x - y); - y = -HALF_SQRT_2*(x + y); + y = -HALF_SQRT_2*(x + y); x = tmp; z = -z; return; } @@ -120,7 +120,9 @@ Vector3 Vector3::operator %(const Vector3 &v) const // dot product template T Vector3::operator *(const Vector3 &v) const -{ return x*v.x + y*v.y + z*v.z; } +{ + return x*v.x + y*v.y + z*v.z; +} template float Vector3::length(void) const