Atn Function

Trigonometria funkcio kiu liveras la arktangenton de numera esprimo. La livera valoro estas en la amplekso -Pi/2 to +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

Syntax:


        Atn (Number As Double) As Double
    

Return value:

Double

Parameters:

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).

Por konverti radianoj al gradoj, multipliku radianojn per 180/pi.

gradoj=(radianoj*180)/pi

radianoj=(gradoj*pi)/180

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

Error codes:

5 Nevalida procedurvoko

Example:


        REM La jena ekzemplo kalkulas por orta triangulo
        REM la angulon Alfa de la tangento de la angulo Alfa:
        Sub ExampleAtn
        REM rondigita Pi = 3.14159 estas difinita konstanto
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Tajpu la longon de la latero apud la angulo: ","apuda")
            d2 = InputBox("Tajpu la longon de la latero kontraŭ la angulo: ","kontraŭa")
            Print "Angulo Alfa estas"; (atn (d2/d1) * 180 / Pi); " gradoj"
        End Sub
    

Bonvolu subteni nin!