弧度 = 角度 * Math.PI / 180
角度 = 弧度 * 180 / Math.PI
In the JavaScript Math object:
The sin () method returns the sine of a number.
The tan () method returns a number that represents the tangent of a corner.
Math.sin(x)Math.tan(x)
Parameter x is required. A corner expressed in radians. Multiply the angle by 0.017453293 (2pi/360) to convert to radians (that is, angle * math.pi/180).
The Cos () method returns the cosine of a number.
Math.cos(x)
Parameter x is required. Must be a numeric value.
The ASIN () method returns the inverse chord value of a number.
The ACOs () method returns the inverse cosine of a number.
Math.asin(x)Math.acos(x)
Parameter x is required. Must be a numeric value between X∈[-1, 1].
The Atan () method returns the inverse tangent value of a number.
Math.atan(x)
Parameter x is required. Must be a numeric value.
The POW () method returns the value of the Y-power of X.
Math.pow(x,y)
Parameter x is required. Base Must be a number.
Parameter y is required. The power number. Must be a number.
The sqrt () method returns the square root of a number.
Math.sqrt(x)
Parameter x is required. Must be a number greater than or equal to 0.
- Review Trigonometric functions
Sine (sin): to edge ratio hypotenuse SinA = A/C
Cosine (COS): Adjacent edge ratio hypotenuse CosA = b/c
Tangent (tan): to edge adjacent edge Tana = A/b
Cotangent (Cot): Adjacent edge-to-edge CotA = b/a
Secant (sec): hypotenuse adjacent Edge
Residual cutting (CSC): hypotenuse ratio to edge
sina/a = sinb/b = sinc/c
Can also be expressed as:
A/sina = B/SINB = C/sinc = 2R (R is the circumscribed circle radius of the triangle)
The trigonometric sine theorem can be used to obtain the area of a triangle:
S = 1/2absinc = 1/2bcsina = 1/2acsinb
a2 = b2 + C2-2BC CosA
b2 = A2 + c2-2ac Cosb
C2 = a2 + b2-2ab CosC
Can also be expressed as:
Cosa= (C2 +b2-a2)/2BC
cosb= (A2 +c2-b2)/2AC
cosc= (A2 +b2-c2)/2ab
First cosine theorem:
A = b Cosc + c COSB
b = C Cosa + a Cosc
c = a COSB + b cosa
(A + B)/(a) = tan ((A + B)/2)/tan ((-a)/2)
Conversion of radians and angles in JavaScript