Funció Atn

Funció trigonomètrica que torna l'arc tangent d'una expressió numèrica. El valor de retorn es troba a l'interval entre -Pi/2 i +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

Sintaxi:


        Atn (Number As Double) As Double
    

Valor de retorn:

Double

Paràmetres :

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

Per convertir radians en graus, multipliqueu els radians per 180/pi.

grau=(radian*180)/pi

radian=(grau*pi)/180

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

Codis d'error

5 La crida al procediment no és vàlida

Exemple :


        ' L'exemple següent calcula un triangle rectangle
        ' l'angle Alpha de la tangent de l'angle Alpha:
        Sub ExampleAtn
        ' Pi arrodonit = 3,14159 és una constant predefinida
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Introduïu la longitud del costat adjacent a l'angle: ","Adjacent")
            d2 = InputBox("Introduïu la longitud del costat oposat de l'angle: ","Oposat")
            Print "L'angle Alpha fa"; (atn (d2/d1) * 180 / Pi); " graus"
        End Sub
    

Ens cal la vostra ajuda!