1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00

Do not round up the angle to avoid an out-of-boundary condition.

This commit is contained in:
Jung-uk Kim 2012-04-19 21:28:59 +00:00
parent b07e109b52
commit e01c1892b3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295129
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= plasma
PORTVERSION= 0.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= graphics kld
MASTER_SITES= SF/futurebsd/futurebsd/${PORTNAME}
PKGNAMESUFFIX= -kmod

View File

@ -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]);
}