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
    

Повертає значення:

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 Неправильний виклик процедури

Приклад:


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

Будь ласка, підтримайте нас!