It is no secret that using constants in your C++ code can make your code easier to read and maintain, allowing you to eliminate *magic numbers*, aka raw numerical values floating in your code with no clear meaning or definition. A simple *const* or *constexpr* (see here to learn more about the differences) can quickly improve the quality of your code.

Some numbers are easily recognizable from their raw numerical values. Consider *3.14*, the widely known constant for *pi* — a C++ program that calculates nearly any mathematical value involving curves will need to use the value of *pi* in…