projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
621b107
)
cairo-chart: Make it clear that fabs() of integer values is intended.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 23 Sep 2017 17:44:01 +0000
(10:44 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 23 Sep 2017 17:44:01 +0000
(10:44 -0700)
Reported by Clang.
src/output/cairo-chart.c
patch
|
blob
|
history
diff --git
a/src/output/cairo-chart.c
b/src/output/cairo-chart.c
index 802aa07bd2a177ea39e12b8b26921999685f459c..db8eb67ecf45f65625bb2df0229a8b3335d6a17e 100644
(file)
--- a/
src/output/cairo-chart.c
+++ b/
src/output/cairo-chart.c
@@
-389,8
+389,9
@@
xrchart_write_scale (cairo_t *cr, struct xrchart_geometry *geom,
geom->axis[orient].max = upper;
geom->axis[orient].min = lower;
- geom->axis[orient].scale = (fabs (geom->axis[orient].data_max - geom->axis[orient].data_min)
- / fabs (geom->axis[orient].max - geom->axis[orient].min));
+ struct xrchart_axis *axis = &geom->axis[orient];
+ geom->axis[orient].scale = (fabs ((double) axis->data_max - axis->data_min)
+ / fabs (axis->max - axis->min));
if (orient == SCALE_ABSCISSA)
{