X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Foutput%2Fcharts%2Fpiechart.c;h=a1986bd3122c532c65a03184004f534abd7f5da4;hb=9105b67fe006fe41c044e3659325594a52d0c899;hp=37788380a87ccf5c495cfb71836d138b95544750;hpb=a19b858e0ac3c69e4a28c0ca6d8674427268a863;p=pspp-builds.git diff --git a/src/output/charts/piechart.c b/src/output/charts/piechart.c index 37788380..a1986bd3 100644 --- a/src/output/charts/piechart.c +++ b/src/output/charts/piechart.c @@ -1,7 +1,6 @@ /* PSPP - draws pie charts of sample statistics Copyright (C) 2004 Free Software Foundation, Inc. -Written by John Darrington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -33,7 +32,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA #include #include #include -#include + +#include "minmax.h" /* Pie charts of course need to know Pi :) */ @@ -71,7 +71,7 @@ piechart_plot(const char *title, const struct slice *slices, int n_slices) const double centre_x = (ch->data_right + ch->data_left ) / 2.0 ; const double centre_y = (ch->data_top + ch->data_bottom ) / 2.0 ; - const double radius = min( + const double radius = MIN( 5.0 / 12.0 * (ch->data_top - ch->data_bottom), 1.0 / 4.0 * (ch->data_right - ch->data_left) );