1. Today to define a view to achieve our needs, is the rotation of things, today, a problem, that is, the conversion between angle and radian: High school things are almost forgotten, that still remember Ah, but to learn ah, there is no way!!
Here are a few concepts to understand:
Fabs (Double): absolute value of the type of double floating point
ABS (int): Absolute value of the type of int of integer
sqrt function: Calculate z= (X*x+y*y), (Method of Square)
Round: If the parameter is a decimal, the rounding of itself is asked
Ceil: If the parameter is a decimal, the smallest integer is not less than itself.
Floor: If the parameter is a decimal, the largest integer is evaluated but not greater than itself.
atan2f function: (y,x): Calculates the radian between two coordinate points
How the angle is computed: cgfloat angle = (radius (radians)/m_pi (π)) *180
Calculation of radians: cgfloat radius = (Agnle (angle) *m_pi (π))/180,
Calculation formula for one radian: 1 radius = 180/m_pi (π) = 57.18
cos (radians): corresponds to the length of Y
Sin (radians): corresponds to the length of X
Conversion between radians and angles