make math code more readable
|Status:||Rejected||Start date:||12 May 2015|
Adapt extant math code (e.g. form factor calculations) to the following agreed conventions:
- In a source file that contains several calls to sqrt, exp, sin, and the like: use "using namespace std"
- Ditto, when there are calls to sinc: "using namespace MathFunctions"
- Change Sinc into sinc: when it comes to the readability of formulae, math conventions are more important than project-wide coding conventions
- At single source file level, define I = complex_t(0.0, 1.0).
- Add function sqr(x)=x*x to MathFunctions
- Never introduce auxiliary variables like m_root3 = std::sqrt(3.0); leave it to the compiler to replace 'sqrt(3) by a constant.