Collabora Office 24.04 Help
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
Tan (Number As Double) As Double
Double
Number: Any numeric expression that you want to calculate the tangent for (in radians).
To convert degrees to radians, multiply by Pi/180. To convert radians to degrees, multiply by 180/Pi.
degrees=(radians*180)/Pi
radians=(degrees*Pi)/180
Pi is approximately 3.141593.
REM U ovom primjeru, sljedeći unos je moguć za desnokutni trokut:
REM Strana nasuprotna kutu i kut (u stupnjevima) za izračun duljine strane koja priliježena kut:
Sub ExampleTangens
REM Pi = 3.1415926 je predefinirana varijabla
Dim d1 As Double
Dim dAlpha As Double
d1 = InputBox("Unesite dužinu stranice nasuprotne kutu: ","nasuprot")
dAlpha = InputBox("Unesite alfa kut (u stupnjevima): ","Alpha")
Print "dužina ruba graničnog kuta je"; (d1 / tan (dAlpha * Pi / 180))
End Sub