Atn Function

Trigonometrinė funkcija, kuri grąžina skaitinio reiškinio arktangentą. Grąžinimo reikšmė yra intervale nuo -Pi/2 iki + Pi/2.

The arctangent is the inverse of the tangent function. The Atn Function returns the angle "Alpha", expressed in radians, using the tangent of this angle. The function can also return the angle "Alpha" by comparing the ratio of the length of the side that is opposite of the angle to the length of the side that is adjacent to the angle in a right-angled triangle.

Atn(side opposite the angle/side adjacent to angle)= Alpha

Sintaksė:


        Atn (Number As Double) As Double
    

Grąžinimo reikšmė:

Double

Parametrai:

Number: Any numerical expression that represents the ratio of two sides of a right triangle. The Atn function returns the corresponding angle in radians (arctangent).

Norėdami konvertuoti radianus į laipsnius, padauginkite radianus iš 180/pi.

laipsnis=(radianas*180)/pi

radianas=(laipsnis*pi)/180

Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.

Klaidos kodai:

5 Neteisingas procedūros iškvietimas

Pavyzdys:


        ' Šis pavyzdys skirtas stačiajam trikampiui
        ' kampas„ Alpha“ atsižvelgiant į kampo„ Alpha“ tangentą:
        Sub ExampleAtn
        ' suapvalinta Pi = 3,14159 yra apibrėžta konstanta
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Įveskite kraštinės, esančios šalia kampo, ilgį: ","Šalia")
            d2 = InputBox("Įveskite kraštinės, esančios priešais kampo, ilgį: ","Priešais")
            Print "„Alfa“ kampas lygus"; (atn (d2/d1) * 180 / Pi); " laipsnių"
        End Sub
    

Paremkite mus!