[ODE] Wrong brackets in definition of dSqrt in common.h ?
Olex
mr.olexander at gmail.com
Wed Dec 14 12:40:11 MST 2005
Rant:
Shouldn't the whole ODE be written in C++, so we can avoid issues like
these? For example this dSqrt can be made a template that has
specilization on float and double. Which makes life easier since there
wouldn't be a need for #ifdef clauses.
On 12/14/05, Peter Onion <Peter.Onion at btinternet.com> wrote:
> 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
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
--
Oleksandr Lozitskiy
"To be without some of the things you want is an indispensable part of
happiness." by Bertrand Russell
More information about the ODE
mailing list