projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78d55cb
)
piechart: Change 'angle' variable from static to automatic.
author
Ben Pfaff
<blp@gnu.org>
Thu, 2 Jul 2009 02:29:49 +0000
(19:29 -0700)
committer
Ben Pfaff
<blp@gnu.org>
Thu, 2 Jul 2009 03:46:29 +0000
(20:46 -0700)
src/output/charts/piechart.c
patch
|
blob
|
history
diff --git
a/src/output/charts/piechart.c
b/src/output/charts/piechart.c
index 5ff6123b94b69e2c57401308de633c36cf9b6c7b..869f21b2b4892e288b5cbbf8a8b43581fd4366b5 100644
(file)
--- a/
src/output/charts/piechart.c
+++ b/
src/output/charts/piechart.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004
, 2009
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-66,16
+66,17
@@
piechart_plot(const char *title, const struct slice *slices, int n_slices)
1.0 / 4.0 * (ch->data_right - ch->data_left)
);
1.0 / 4.0 * (ch->data_right - ch->data_left)
);
+ double angle;
+
chart_write_title(ch, title);
for (i = 0 ; i < n_slices ; ++i )
total_magnitude += slices[i].magnitude;
chart_write_title(ch, title);
for (i = 0 ; i < n_slices ; ++i )
total_magnitude += slices[i].magnitude;
+ angle = 0.0;
for (i = 0 ; i < n_slices ; ++i )
{
for (i = 0 ; i < n_slices ; ++i )
{
- static double angle=0.0;
-
const double segment_angle =
slices[i].magnitude / total_magnitude * 2 * M_PI ;
const double segment_angle =
slices[i].magnitude / total_magnitude * 2 * M_PI ;