From 573652f264c7fc92e985d118b1f3dc64a5c6c9fc Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 27 Jan 2009 11:42:44 -0800 Subject: [PATCH] Fix rounding when deciding between major and minor tick We noticed that some charts were missing a major tick, (like 0, 0.5, ,1.5, 2.0, 2.5). Fix this. --- acre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acre.c b/acre.c index 1ca0505..3ddf143 100644 --- a/acre.c +++ b/acre.c @@ -552,7 +552,7 @@ _draw_ticks (acre_t *acre, t += sub_step) { int tick_size; - if (fabs((t / step) - (int) (t / step)) < 0.5 * (sub_step / step)) + if (fabs((t / step) - round (t / step)) < 0.5 * (sub_step / step)) tick_size = ACRE_TICK_MAJOR_SIZE; else tick_size = ACRE_TICK_MINOR_SIZE; -- 2.43.0