Tan Function

Determines the tangent of an angle. The angle is specified in radians.

Using the angle Alpha, the Tan Function calculates the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle in a right-angled triangle.

Tan(Alpha) = side opposite the angle/side adjacent to angle

Syntax:


Sin (Number)

рд╡рд╛рдкрд╕реА рдореВрд▓реНрдп:

рджреЛрдЧреБрдирд╛

рдкреИрд░рд╛рдореАрдЯрд░

Number: Any numeric expression that you want to calculate the tangent for (in radians).

рдбрд┐рдЧреНрд░реА рдХреЛ рд░реЗрдбрд┐рдпрди рдореЗрдВ рдмрджрд▓рдиреЗ рдХреЗ рд▓рд┐рдП, Pi/180 рд╕реЗ рдЧреБрдгрд╛ рдХрд░реЗрдВ. рд░реЗрдбрд┐рдпрди рд╕реЗ рдбрд┐рдЧреНрд░реА рдореЗрдВ рдмрджрд▓рдиреЗ рдХреЗ рд▓рд┐рдП, 180/Pi рд╕реЗ рдЧреБрдгрд╛ рдХрд░реЗрдВ.

grad=(radiant*180)/pi

radiant=(grad*pi)/180

Pi is approximately 3.141593.

Error codes:

5 Invalid procedure call

рдЙрджрд╛рд╣рд░рдг:


' In this example, the following entry is possible for a right-angled triangle:
' The side opposite the angle and the angle (in degrees) to calculate the length of the side adjacent to the angle:
Sub ExampleTangens
' Pi = 3.1415926 is a pre-defined variable
Dim d1 As Double
Dim dAlpha As Double
    d1 = InputBox("Enter the length of the side opposite the angle: ","opposite")
    dAlpha = InputBox("Enter the Alpha angle (in degrees): ","Alpha")
    Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))
End Sub