Conversion of radians and angles in JS

Source: Internet
Author: User

Read a lot of tutorials online, are written too complex, in fact, arc and angle conversion is very easy

Radian = angle * MATH.PI/180;

Angle = Radian * 180/MATH.PI;

It's so simple, just look at the calculator,

Sin30 is 0.5, what is the value in the program? Console.log (Math.sin (30*math.pi/180));

The value is slightly biased, but it doesn't matter, JS itself is not good at arithmetic.

Finally, review the sine, cosine, tangent, cotangent.

Sine: Opposite than hypotenuse

Cosine: Edge ratio hypotenuse

Tangent: to Bembirin Edge

Cotangent: Edge-to-side ratio

There's also a secant and a cut,

Secant: hypotenuse ratio to edge

Residual cut: hypotenuse than the Edge

Finally, I hate the tutorials that complicate simple questions online.

Conversion of radians and angles in JS

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.