You can use that:
#define _USE_MATH_DEFINES // for C++
#include <cmath>
#define _USE_MATH_DEFINES // for C
#include <math.h>
Math Constants are not defined in Standard C/C++. To use them, you must first define _USE_MATH_DEFINES
and then include cmath
or math.h
.