[buffer] use math::pi instead of M_PI