t52UX‖

DCNvX‖Atn Function

yugFQ‖Trigonometric function that returns the arctangent of a numeric expression. The return value is in the range -Pi/2 to +Pi/2.

tC5uH‖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.

HbFxP‖Atn(side opposite the angle/side adjacent to angle)= Alpha

FVEx2‖Syntax:


        Wo87E‖Atn (Number As Double) As Double
    

GePPP‖Return value:

Double

WADQ4‖Parameters:

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

qhMAk‖To convert radians to degrees, multiply radians by 180/pi.

GEpFX‖degree=(radian*180)/pi

GYxEc‖radian=(degree*pi)/180

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

SEjHR‖Error codes:

5 Invalid procedure call

EFSA4‖Example:


        BBQTN‖' The following example calculates for a right-angled triangle
        RzgP4‖' the angle Alpha from the tangent of the angle Alpha:
        Sub ExampleAtn
        gatE3‖' rounded Pi = 3.14159 Is a predefined constant
        Dim d1 As Double
        Dim d2 As Double
        hYpCY‖    d1 = InputBox("Enter the length of the side adjacent to the angle: ","Adjacent")
        vEUCq‖    d2 = InputBox("Enter the length of the side opposite the angle: ","Opposite")
        vj7tS‖    Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees"
        End Sub