Skip to content

Instantly share code, notes, and snippets.

@VojislavM
Forked from dbrockman/degrees-radians.h
Created September 27, 2016 12:21
Show Gist options
  • Save VojislavM/a24087f8909b1946d11df559f54a4131 to your computer and use it in GitHub Desktop.
Save VojislavM/a24087f8909b1946d11df559f54a4131 to your computer and use it in GitHub Desktop.
Convert degrees <-> radians C macros
// Converts degrees to radians.
#define degreesToRadians(angleDegrees) (angleDegrees * M_PI / 180.0)
// Converts radians to degrees.
#define radiansToDegrees(angleRadians) (angleRadians * 180.0 / M_PI)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment