From: John Darrington Date: Sun, 25 Mar 2012 07:18:54 +0000 (+0200) Subject: Whitespace changes only X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb40e3030d292798a25e3d06bb5dcf31ebf899af;p=pspp Whitespace changes only --- diff --git a/src/math/chart-geometry.c b/src/math/chart-geometry.c index 3ad02539ba..eb0ad9282a 100644 --- a/src/math/chart-geometry.c +++ b/src/math/chart-geometry.c @@ -20,29 +20,30 @@ #include "chart-geometry.h" +static const double standard_ticks[] = {1, 2, 5, 10}; + + /* Adjust tick to be a sensible value ie: ... 0.1,0.2,0.5, 1,2,5, 10,20,50 ... */ double -chart_rounded_tick(double tick) +chart_rounded_tick (double tick) { int i; double diff = DBL_MAX; double t = tick; - static const double standard_ticks[] = {1, 2, 5, 10}; - double factor; /* Avoid arithmetic problems with very small values */ if (fabs (tick) < DBL_EPSILON) return 0; - factor = pow(10,ceil(log10(standard_ticks[0] / tick))) ; + factor = pow (10,ceil (log10 (standard_ticks[0] / tick))); for (i = 3 ; i >= 0 ; --i) { - const double d = fabs( tick - standard_ticks[i] / factor ) ; + const double d = fabs (tick - standard_ticks[i] / factor); if ( d < diff ) { @@ -52,6 +53,5 @@ chart_rounded_tick(double tick) } return t; - }