From e01c1892b37d12436285e8ec4fb60678a9fafb63 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 19 Apr 2012 21:28:59 +0000 Subject: Do not round up the angle to avoid an out-of-boundary condition. --- graphics/plasma-kmod/files/patch-plasma_saver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/plasma-kmod/files/patch-plasma_saver.c') diff --git a/graphics/plasma-kmod/files/patch-plasma_saver.c b/graphics/plasma-kmod/files/patch-plasma_saver.c index 69bc3c854f32..df7ec0479f30 100644 --- a/graphics/plasma-kmod/files/patch-plasma_saver.c +++ b/graphics/plasma-kmod/files/patch-plasma_saver.c @@ -42,7 +42,7 @@ /* theta now > 0, < 2pi, look up in table */ - apos = (int)((theta/TWO_PI)*90.0); -+ apos = fdiv(fdiv(theta * SCALE, TWO_PI) * 90, SCALE); ++ apos = fdiv(theta * SCALE, TWO_PI) * 90 / SCALE; return((neg) ? -aprsinv[apos] : aprsinv[apos]); } -- cgit v1.2.3