[ODE] Wrong brackets in definition of dSqrt in common.h ?

Peter Onion Peter.Onion at btinternet.com
Wed Dec 14 12:21:17 MST 2005


On Tue, 2005-12-13 at 17:05 -0600, Rodrigo Hernandez wrote:
> Well, thats the problem,
> I just checked and on UNSTABLE, it is defined as
> 
> #define dSqrt(x) sqrt(x)
> 
> and there dont seem to be any castings at all for the other macros, this 
> is perfectly fine on C,
> I doubt STABLE is any different, but it may as well be,
> did you apply any patches?
> 

Thats Odd, because I just updated my UNSTABLE  and it clearly has 
#define dSqrt(x) ((float)sqrtf(float(x)))            /* square root */

Hmmmmm... hang on.....

It looks like we are both right....  It depends on dSINGLE or dDOUBLE.


Anyway, with dSINGLE defined I think it is still wrong as the C++ style
casts shouldn't be present in C header files.

Peter




More information about the ODE mailing list