Use system independent `M_PI`

No need to define pi, `M_PI` is defined in `math.h`.