math.h does not define M_PI on windows, needs BLI_math_base.h to get them. thanks to @quollism on chat for spotting it.