Помощ за LibreOffice 7.3
Намира тангенса на ъгъл, зададен в радиани.
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: числов израз – ъгъл в радиани, чийто тангенс искате да намерите.
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.
' Този пример позволява въвеждане на срещулежащия катет
' и ъгъл в градуси, за да се изчисли дължината на прилежащия катет.
Sub ExampleTangens
' Pi = 3.1415926 е предварително дефинирана променлива
Dim d1 As Double
Dim dAlpha As Double
d1 = InputBox("Въведете дължината на срещулежащия катет: ", "Срещулежащ катет")
dAlpha = InputBox("Въведете ъгъла в градуси: ", "Ъгъл")
Print "Дължината на прилежащия катет на ъгъла е "; (d1 / Tan(dAlpha * Pi / 180))
End Sub