mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 05:23:34 +08:00
Quaternion: use template type for division by two
This commit is contained in:
@@ -174,7 +174,7 @@ public:
|
||||
q(1) = q(2) = q(3) = 0;
|
||||
} else {
|
||||
Type magnitude = sin(angle / Type(2));
|
||||
q(0) = cos(angle / 2.0f);
|
||||
q(0) = cos(angle / Type(2));
|
||||
q(1) = axis(0) * magnitude;
|
||||
q(2) = axis(1) * magnitude;
|
||||
q(3) = axis(2) * magnitude;
|
||||
|
||||
Reference in New Issue
Block a user