Atn Function

Тригонометрическая функция, возвращающая арктангенс числового выражения. Возвращаемое значение находится в диапазоне от -Pi/2 до 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

Синтаксис:


        Atn (Number As Double) As Double
    

Return value:

Double

Параметры:

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

Чтобы преобразовать радианы в градусы, следует умножить радианы на 180/pi.

Градусы=(Радианы*180)/pi

Радианы=(Градусы*пи)/180

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

Коды ошибок:

5 Неправильный вызов процедуры

Пример:


        REM В следующем примере для прямоугольного треугольника вычисляется
        REM угол Alpha из тангенса угла Alpha.
        Sub ExampleAtn
        REM округлённое число Pi = 3,14159 является предопределённой константой
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Введите длину стороны, прилежащей к углу: ","Прилежащая")
            d2 = InputBox("Введите длину стороны, противолежащей углу: ","Противолежащая")
            Print "Угол Alpha равен"; (atn (d2/d1) * 180 / Pi); " градусов"
        End Sub
    

Пожалуйста, поддержите нас!