-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pranet dev #1895
Pranet dev #1895
Conversation
// return a; | ||
// else | ||
// return -a; | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologize if I am missing something obvious, but I don't quite get why commenting the abs
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any difference between these two below in order to compute the absolute value?
else if (a>0)
return a;
else
return -a;
and
else if (a<0)
return -a;
else
return a;
This patch also fails to call the new function from within the TParameter::compare_ptype() function... I will submit my patch soon |
Hi, @dhruv13J |
All right @pranet, I get it now. Thanks for the clarification! |
And how do I call the new function from TParameter::compare_ptype()? Do I have to use the existing one , or am I allowed to overload it as a template? |
I see. thanks! |
I guess this one is redundant to #1896, so I am closing it for now |
Proper comparison of floating point values in equals method #1888