Improve readability.
This commit is contained in:
parent
002cada172
commit
db3c70e235
1 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
#include "heading_indicator_dg.hxx"
|
#include "heading_indicator_dg.hxx"
|
||||||
|
|
||||||
|
/** Macro calculating x^6 (faster than super-slow math/pow). */
|
||||||
|
#define POW6(x) (x*x*x*x*x*x)
|
||||||
|
|
||||||
HeadingIndicatorDG::HeadingIndicatorDG ( SGPropertyNode *node ) :
|
HeadingIndicatorDG::HeadingIndicatorDG ( SGPropertyNode *node ) :
|
||||||
name("heading-indicator-dg"),
|
name("heading-indicator-dg"),
|
||||||
|
@ -150,7 +152,7 @@ HeadingIndicatorDG::update (double dt)
|
||||||
|
|
||||||
// Next, calculate the indicated heading,
|
// Next, calculate the indicated heading,
|
||||||
// introducing errors.
|
// introducing errors.
|
||||||
double factor = spin * spin * spin * spin * spin * spin;
|
double factor = POW6(spin);
|
||||||
double heading = _heading_in_node->getDoubleValue();
|
double heading = _heading_in_node->getDoubleValue();
|
||||||
if (spin < 0.9)
|
if (spin < 0.9)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue