summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ad248e)
raw | patch | inline | side by side (parent: 4ad248e)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 May 2008 15:39:41 +0000 (15:39 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 May 2008 15:39:41 +0000 (15:39 +0000) |
program/src/rrd_graph.c | patch | blob | history |
index 09e0cb19893c9cc2fc0dc4bfc4e21aad33b74001..a0e3ddc3501ee4510f750bc21c90d2332ecd8c26 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
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;
}
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,
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(