How to Convert Degrees to Radians, Radians to Degrees


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. CGFloat DegreesToRadians(CGFloat degrees)
  2. {
  3. return degrees * M_PI / 180;
  4. };
  5.  
  6. CGFloat RadiansToDegrees(CGFloat radians)
  7. {
  8. return radians * 180 / M_PI;
  9. };

URL: http://blog.digitalagua.com/2008/06/30/how-to-convert-degrees-to-radians-radians-to-degrees-in-objective-c/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.