You can use M_PI instead of defining our own pi constant (except you need it to be exactly 3.14).