RE: [AD] sin, cos, sincos

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


Title: RE: sin, cos, sincos

Ahem.
It's even better with the diff. :>

--
Vincent Penquerc'h

> -----Original Message-----
> From: Vincent Penquerc'h
> Sent: Monday, October 22, 2001 10:44 AM
> To: 'conductors@xxxxxxxxxx'
> Subject: sin, cos, sincos
>
>
> I've noticed, in math3d.c, that often sin and cos of a number are
> used, so I've made a routine that gets both of them at a time, since
> some CPUs have a faster way to get both at a time.
> I've then noticed that rotate.c already was using it for DJGPP :)
> Here's a patch that adds it.
>
> I've moved the DJGPP call from rotate.c, but haven't tested it, since
> I'm on Linux. The version for Linux GCC is commented out, since I
> can't seem to be able to get the definition of either sincos or
> __sincos (linux 2.2.10, glibc 2.1.1). Probably some define trickery
> that needs to be added (I've tried USE_EXTERN_INLINES
> (IIRC)). It might
> be different for other versions ?
> There is a plain version for platforms that can't do it (eg
> it computes
> both values separately).
>
> The patch to imaths.h should be put in alinline.h, since I made
> this on an already modified version of 3.9.39 (with my header
> splitting
> thingie) and I didn't keep a copy of the original one :/
>
> It's just something added at the end of the file though.
>
> Cheers
>
> --
> Vincent Penquerc'h
>

 

Attachment: sincos.diff
Description: Binary data



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