In iOS, a picture is rotated in radians rather than angles , so it is often converted between the two
- Radian to Angle
#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI))
- Angle to radians
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
Excerpt from: Conversion of angles to radians
<!--more--
Angle Radian Definition
Radians and degrees are two different units of measure angular size.
Degree
Two rays are shot from the center to the circumference, forming an arc of a positive pair of angles and angles. When the length of the arc is exactly equal to one of 360 of the circumference, the angle of the two rays is 1 degrees.
Radian
Two rays are shot from the center to the circumference, forming an arc of a positive pair of angles and angles. When the arc length is exactly equal to the radius of the circle, the angle size of the two rays is 1 radians.
?
formula:π is π radian, 180 is 180 degrees. I'm going to turn it into a unit, and I'm going to put the unit on the molecule. That is, I'm going to turn it into radians and I'm going to put π radians on the molecule-multiplied by π/180
Turn from: The relationship between radians and angles
iOS angle and radians conversion