Replace std:: with math:: when invoking math functions. (1/4)
In this merge request I am changing the mathematical functions from using std::
to using math::
in places where std::
was written. This change is necessary because for high precision Real to work an always correct mathematical function has to be called. And correct look-up rules I have implemented in !362 (merged) in file EDIT: in this merge request in file MathFunctions.hpp
MathFunctions.hpp
.
It is not necessary to add math::
in places where std::
was omitted, thanks to argument depended lookup. So that those of us who like to write extra qualification for math functions can still write it.
If you think that using one letter shorter mth::
instead of math::
would be better it is a quick search and replace (math→mth) of git diff master
. I am not sure of one letter less is worth it though, especially since writing math::
is just convenience and not mandatory at all. The only practical difference is that grep -E "math::" . -rin --color
also finds .rst
files, because math::
is a part of restructured text syntax. But adding --include='*pp'
to grep
invocation solves this also. If you think a different namespace name should be used, this MR is the place to change it (quickly and easily).
About "duplicate" name, where we have Mathr
class and math::
namespace, it is not a problem, because this will be fixed along with #97.
Nevertheless please let me know if I should:
- keep
math::
as it is - put
mth::
in these places - put
m::
in these places.
I would rather not move entire math::
into yade::
namespace. This might result in some nasty surprises due to name collisions. The variables named min
and max
are the top contenders for such surprises :)