[AD] Bug in arc()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello,
Long ago we discussed a bug in arc() on [AL]. The attached patch is
the same as I posted there, but with modifications suggested by Eric.
(namely, using AL_PI instead of M_PI and allowing to use al_sincos()
when it will be added). The routine is ~5% slower on my computer.
The bugs were low precision when calculating angles and incorrect
test for reaching the end of the arc. I uploaded my test program to
http://home.student.uu.se/svsa1977/tmp/arctest.zip in case anyone
needs it.
--
Sven Sandberg   svsa1977@xxxxxxxxxx   home.student.uu.se/svsa1977



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/