← Back to team overview

yade-dev team mailing list archive

Re: NaN problem solved

 

> It would have been (a lot) easier to find if there was such a code:

I would suggest to check that norm==0 (sharp float comparison) and throw
an exception with a more detailed explanation -- 

 if(norm==0) throw runtime_error(("Zero distance between spheres #"+lexical_cast<string>(c->getId1())+" and #"+lexical_cast<string>(c->getId2())+".").c_str())

Cheers, v.





Follow ups

References