← Back to team overview

yade-dev team mailing list archive

Re: Problem with 2399 commit

 

> It definitely solved the problem. I do not know, why Mathr did not
> work there:
> 
> There are 2 conditions, which were in shop.cpp:
>         if (Mathr::FAbs(b->cn) <= Mathr::ZERO_TOLERANCE ) b->cn=0;
>         if (Mathr::FAbs(b->cs) <= Mathr::ZERO_TOLERANCE ) b->cs=0;
> 
> The comic thing is, that the FAbs(b->cn) worked normally, but
> FAbs(b->cs) did not!!!
> I can't find the explanation of this issue.
> 
> You think it is a good idea to get rid off "Mathr" everywhere, where
> possible?
Eventually yes, there are equivalent standard library functions, see
lib/base/Math.hpp (a few of them have no equivalent, though). If you
want to replace sqrt etc everywhere, go ahead, that will be useful, but
it is not at all urgent -- those few lines are harmless (or should be).

Cheers, v.






References