Browse Source

AP_Math: quaternion fix missing return

mission-4.1.18
Pierre Kancir 8 years ago committed by Lucas De Marchi
parent
commit
fb7a00799f
  1. 2
      libraries/AP_Math/quaternion.cpp

2
libraries/AP_Math/quaternion.cpp

@ -169,6 +169,7 @@ void Quaternion::from_axis_angle(const Vector3f &axis, float theta) @@ -169,6 +169,7 @@ void Quaternion::from_axis_angle(const Vector3f &axis, float theta)
if (is_zero(theta)) {
q1 = 1.0f;
q2=q3=q4=0.0f;
return;
}
float st2 = sinf(theta/2.0f);
@ -201,6 +202,7 @@ void Quaternion::from_axis_angle_fast(Vector3f v) @@ -201,6 +202,7 @@ void Quaternion::from_axis_angle_fast(Vector3f v)
if (is_zero(theta)) {
q1 = 1.0f;
q2=q3=q4=0.0f;
return;
}
v /= theta;
from_axis_angle_fast(v,theta);

Loading…
Cancel
Save