From: Tobias Oetiker Date: Sun, 18 May 2008 15:39:41 +0000 (+0000) Subject: ytr boundery checking ... this is from the GD days ... we don't need this anymore X-Git-Tag: 1.3rc5~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1a1918afba049d49e33d050da2dcf6ef1acdab3;p=thirdparty%2Frrdtool-1.x.git ytr boundery checking ... this is from the GD days ... we don't need this anymore git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1370 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 09e0cb19..a0e3ddc3 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -201,16 +201,6 @@ double ytr( yval = im->yorigin - pixie * (log10(value) - log10(im->minval)); } } - /* make sure we don't return anything too unreasonable. GD lib can - get terribly slow when drawing lines outside its scope. This is - especially problematic in connection with the rigid option */ - if (!im->rigid) { - /* keep yval as-is */ - } else if (yval > im->yorigin) { - yval = im->yorigin + 0.00001; - } else if (yval < im->yorigin - im->ysize) { - yval = im->yorigin - im->ysize - 0.00001; - } return yval; } @@ -1122,6 +1112,10 @@ int data_calc( return 0; } +/* from http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm */ +/* yes we are loosing precision by doing tos with floats instead of doubles + but it seems more stable this way. */ + static int AlmostEqual2sComplement( float A, float B, @@ -2049,10 +2043,6 @@ double frexp10( return mnt; } -/* from http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm */ -/* yes we are loosing precision by doing tos with floats instead of doubles - but it seems more stable this way. */ - /* logaritmic horizontal grid */ int horizontal_log_grid(