Re: [AD] sincos

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


Vincent Penquerc'h wrote:
> Here they are.

Thanks, it looks nice. I haven't tested it, but here are some questions
from reading the patch:

> --- include/allegro/al386gcc.h.sincos	Sun Oct 28 10:07:58 2001
> +++ include/allegro/al386gcc.h	Sun Oct 28 10:25:22 2001
[snip]
> +AL_INLINE(void, _al_sincos, (double value, double *sine, double *cosine),
> +{
> +   __sincos(value, sine, cosine);
> +})

Does this mean that all ports of gcc have a __sincos() function? In that
case we could put it in a more generic header, so it works on all gcc's
(for other machines as well). E.g., we could put it in inline/fmaths.h
and have an #ifdef ALLEGRO_GCC around it.

There is also the problem of #including <math.h>. Since Allegro doesn't
do that now, I think it's a pity to introduce it. What do you think
about putting the whole thing in math.c?

> --- include/allegro/aldjgpp.h.sincos	Sun Oct 28 10:08:10 2001
> +++ include/allegro/aldjgpp.h	Sun Oct 28 10:12:36 2001
[snip]
> +AL_INLINE(void, _al_sincos, (double value, double *sine, double *cosine),
> +{
> +   sincos(cosine, sine, value);
> +})

Isn't this going to collide with the version in al386gcc.h?

-- 
Sven Sandberg    svsa1977@xxxxxxxxxx    home.student.uu.se/svsa1977



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