From 4c1e4783ec827c3a49dfb7541dc0cb4d0ed653aa Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 3 May 2007 12:49:44 +0000 Subject: [PATCH] added some more rounding for int to float comparisons git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@1053 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index aae13170..35978cf6 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -1837,7 +1837,7 @@ horizontal_log_grid(image_desc_t *im) pre_value = value; Y0 = ytr(im, value); - if(Y0 <= im->yorigin - im->ysize) break; + if(round(Y0) <= im->yorigin - im->ysize) break; /* major grid line */ gfx_new_dashed_line ( im->canvas, @@ -1897,7 +1897,7 @@ horizontal_log_grid(image_desc_t *im) if(value < im->minval) continue; Y0 = ytr(im, value); - if(Y0 <= im->yorigin - im->ysize) break; + if(round(Y0) <= im->yorigin - im->ysize) break; /* draw lines */ gfx_new_dashed_line ( im->canvas, @@ -1913,7 +1913,7 @@ horizontal_log_grid(image_desc_t *im) if(value < im->minval) continue; Y0 = ytr(im, value); - if(Y0 <= im->yorigin - im->ysize) break; + if(round(Y0) <= im->yorigin - im->ysize) break; /* draw lines */ gfx_new_dashed_line ( im->canvas, @@ -1954,7 +1954,7 @@ horizontal_log_grid(image_desc_t *im) if(value < im->minval) continue; Y0 = ytr(im, value); - if(Y0 <= im->yorigin - im->ysize) break; + if(round(Y0) <= im->yorigin - im->ysize) break; /* draw lines */ gfx_new_dashed_line ( im->canvas, @@ -1971,7 +1971,7 @@ horizontal_log_grid(image_desc_t *im) if(value < im->minval) continue; Y0 = ytr(im, value); - if(Y0 <= im->yorigin - im->ysize) break; + if(round(Y0) <= im->yorigin - im->ysize) break; /* draw lines */ gfx_new_dashed_line ( im->canvas, -- 2.30.2