Hi. In the Challenge section of chapter 4, page 86 there is the comment:
Notice that there’s no built in value for pi on the GPU.
But MSL defines several mathematical constants, This works:
position.x = radius * cos(2 * M_PI_F * current);
position.y = radius * sin(2 * M_PI_F * current);