From: ThorstenB Date: Fri, 21 Sep 2012 14:44:16 +0000 (+0200) Subject: Improve readability. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db3c70e235cd6a454523445bc0e7ecb046d7bc0d;p=flightgear.git Improve readability. --- diff --git a/src/Instrumentation/heading_indicator_dg.cxx b/src/Instrumentation/heading_indicator_dg.cxx index 52fe89834..efca5713b 100644 --- a/src/Instrumentation/heading_indicator_dg.cxx +++ b/src/Instrumentation/heading_indicator_dg.cxx @@ -22,6 +22,8 @@ #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 ) : name("heading-indicator-dg"), @@ -150,7 +152,7 @@ HeadingIndicatorDG::update (double dt) // Next, calculate the indicated heading, // introducing errors. - double factor = spin * spin * spin * spin * spin * spin; + double factor = POW6(spin); double heading = _heading_in_node->getDoubleValue(); if (spin < 0.9) {