> 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.



_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to