Atn Function

Função trigonométrica que devolve o arco tangente de uma expressão numérica. O valor de retorno está no intervalo entre -Pi/2 e +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

Sintaxe:


        Atn (Number As Double) As Double
    

Valor de retorno:

Double

Parâmetros:

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

Para converter radianos em graus, multiplique os radianos por 180/pi.

grau=(radiano*180)/pi

radiano=(grau*pi)/180

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

Códigos de erro

5 Chamada de procedimento inválido

Exemplo:


        ' O seguinte exemplo calcula um triângulo de ângulos retos
        ' o ângulo Alfa da tangente de um ângulo Alfa:
        Sub ExampleAtn
        ' Pi arredondado = 3,14159 é uma constante pré-definida
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Introduza o comprimento do lado adjacente ao ângulo: ","Adjacente")
            d2 = InputBox("Introduza o comprimento do lado oposto ao ângulo: ","Oposto")
            Print "O ângulo Alfa é"; (atn (d2/d1) * 180 / Pi); " graus"
        End Sub
    

Necessitamos da sua ajuda!