请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSP430G2553 工具/软件:Code Composer Studio
您好!
如何在 CCS 代码中使用数学常量 Pi? 我包含了 math.h 头文件。 我使用了标识符"pi"。
但是、编译器给出了未定义标识符的错误。
谢谢你
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:Code Composer Studio
您好!
如何在 CCS 代码中使用数学常量 Pi? 我包含了 math.h 头文件。 我使用了标识符"pi"。
但是、编译器给出了未定义标识符的错误。
谢谢你
您好!
math.h 定义:
#define M_PI 3.14159265358979323846 /* PI */
#define M_PI_2 1.57079632679489661923 /* PI/2 *
#define M_PI_4 0.78539816339744830962 //* PI/4 *
#define M_1_PI 0.31830988618379067154 /* 1/PI */
#define M_2_PI 0.63661977236758134308 /* 2/PI */
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt (PI)*/