Looks nice. The only complaint is that lexical_cast throws if it fails. You should probably intercept this and display an error.
Are you sure the derivative is right, though? Looks like you've...
Type: Posts; User: Elysia
Looks nice. The only complaint is that lexical_cast throws if it fails. You should probably intercept this and display an error.
Are you sure the derivative is right, though? Looks like you've...
Yes. Since lambdas behave just like functors, and you are using template parameters, it will be fine.
The only thing I can say is avoid atoi (use boost::lexical_cast instead) and I would prefer lambdas over boost::bind (error messages are horrible as usual).
Otherwise it looks like a very nice...
What? You invented your own sqrt or something?
#define TOLERANCE 10^-6
this is incorrect. "^" is not the power operator.
I believe there is a syntax such as
const float g_Tolerance = 10E-6;
Can't remember exactly.
Also, use const instead of...