I want to use PI in my iphone SDK code

How can I use PI in objective-C? How to write coding if I want to do

(36.12 * pi) / 180?

+3
source share
2 answers

Use the M_PI constant. Your code will look like this:

(36.12 * M_PI)/180;
+17
source

You can use constant M_PI

+5
source

All Articles