Conversion between radians and angles

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.