使用math库给我们定一个一些常用常量
https://www.quantstart.com/articles/Mathematical-Constants-in-C/
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
int main() {
std::cout << M_PI << " " << M_E << " " << M_SQRT2 << endl;
return 0;
}
原文:https://www.cnblogs.com/eat-too-much/p/13648417.html