Browse Source

AP_Math: move HALF_SQRT_2 def to rotation.h

This allows it to be used by the Quaternion class
zr-v5.1
Randy Mackay 5 years ago
parent
commit
338548c5eb
  1. 3
      libraries/AP_Math/rotations.h
  2. 2
      libraries/AP_Math/vector3.cpp

3
libraries/AP_Math/rotations.h

@ -80,6 +80,9 @@ enum Rotation : uint8_t { @@ -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:

2
libraries/AP_Math/vector3.cpp

@ -20,8 +20,6 @@ @@ -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>

Loading…
Cancel
Save