IOS angle and radian conversion, iOS radian Conversion
In iOS, the image rotation unit isRadiansInsteadAngle, So the conversion is often performed between the two
# Define RADIANS_TO_DEGREES (radians) * (180.0/M_PI ))
# Define DEGREES_TO_RADIANS (angle)/180.0 * M_PI)
From: Angle and radian Conversion
<! -- More -->
Angle radians
Radians and degrees are two different units of the measurement angle.
Degrees
The two rays are emitted from the center of the center to the circumference, forming an arc with a positive angle and angle. When the arc length is equal to 360 of the circumference, the angle between the two rays is 1 degree.
Radians
The two rays are emitted from the center of the center to the circumference, forming an arc with a positive angle and angle. When the arc length is equal to the circle radius, the angle between the two rays is 1 radian.
Bytes
Tip:: π is π radians, and 180 is 180 degrees. If I want to become a unit, I need to put it on the numerator. That is to say, to convert it into a radian, we need to put the π radian on the numerator -- multiply by π/180