Atn Function

Ermittelt den Arkustangens eines numerischen Ausdrucks. Das Ergebnis wird im Bogenmaß zurückgegeben und liegt im Bereich -(Pi/2) und +(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
    

Rückgabewert:

Double

Parameter:

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

Zur Umrechnung von Bogenmaß in Grad muss das Bogenmaß mit 180/Pi multipliziert werden.

grad=(radiant*180)/pi

radiant=(grad*pi)/180

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

Fehlercodes:

5 Ungültiger Prozeduraufruf

Beispiel:


        ' Das folgende Beispielprogramm berechnet in einem rechtwinkligen Dreieck
        ' aus dem Tangens des Winkels Alpha den Winkel Alpha:
        Sub ExampleAtn
        ' Pi gerundet = 3.14159 ist eine vordefinierte Konstante
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Bitte geben Sie die Länge der Ankathete ein: ","Ankathete")
            d2 = InputBox("Bitte geben Sie die Länge der Gegenkathete ein: ","Gegenkathete")
            Print "Der Winkel Alpha beträgt"; (atn (d2/d1) * 180 / Pi); " Grad"
        End Sub