1 #define _USE_MATH_DEFINES
2 #include<cmath>

加上上面这个就可以使用 M_PI 了,不行就使用下面这个:

1 #define _USE_MATH_DEFINES
2 #include<math.h>

( • ̀ω•́ )✧

c++ 使用PI

相关文章:

  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2021-12-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-12-04
  • 2022-12-23
  • 2022-02-16
相关资源
相似解决方案