Pages

Showing posts with label radians. Show all posts
Showing posts with label radians. Show all posts

July 9, 2013

Degrees to Radians conversion

Very mandatory self-explained function.


/** Convert from degrees to radians.

 @param deg Degrees value.
 @return Returns the radians value.
 @see radiansToDegrees:

 */
CGFloat degreesToRadians (CGFloat deg) {
    return deg * (M_PI / 180.0f);
}



Download the ready-for-use source file (.m) of http://adf.ly/QQEIQ

July 8, 2013

Radians to Degrees conversion

A must to have function that converts radians into degrees.


/** Convert from radians to degrees.

 @param rad Radians value.
 @return Returns the degrees value.
 @see degreesToRadians:

 */
CGFloat radiansToDegrees (CGFloat rad) {
    return rad * (180.0f / M_PI);
}



Download the ready-for-use source file (.m) of Radians to Degrees conversion