mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 13:38:38 -04:00
AP_Math: fix div by zero in quaternion
This commit is contained in:
parent
c57e25142c
commit
07735fefa6
@ -120,6 +120,7 @@ void Quaternion::from_axis_angle(Vector3f v) {
|
||||
if(theta == 0.0f) {
|
||||
q1 = 1.0f;
|
||||
q2=q3=q4=0.0f;
|
||||
return;
|
||||
}
|
||||
v /= theta;
|
||||
from_axis_angle(v,theta);
|
||||
|
Loading…
Reference in New Issue
Block a user