AP_Math: move HALF_SQRT_2 def to rotation.h

This allows it to be used by the Quaternion class
This commit is contained in:
Randy Mackay 2020-04-03 15:26:01 +09:00
parent b0b78e974b
commit 338548c5eb
2 changed files with 3 additions and 2 deletions

View File

@ -80,6 +80,9 @@ enum Rotation : uint8_t {
// maximum rotation that will be used for auto-detection
#define ROTATION_MAX_AUTO_ROTATION ROTATION_ROLL_90_PITCH_315
// definitions used by quaterion and vector3f
#define HALF_SQRT_2 0.70710678118654757f
/*
Here are the same values in a form suitable for a @Values attribute in
auto documentation:

View File

@ -20,8 +20,6 @@
#include "AP_Math.h"
#define HALF_SQRT_2 0.70710678118654757f
// rotate a vector by a standard rotation, attempting
// to use the minimum number of floating point operations
template <typename T>