LibreOffice 7.5 Help
āĻāĻāĻāĻŋ āĻā§āύā§āϰ āĻā§āύāĻā§āύā§āĻ āύāĻŋāϰā§āϧāĻžāϰāĻŖ āĻāϰāĻž āĻšā§āĨ¤ āĻā§āύāĻāĻŋ āϰā§āĻĄāĻŋā§āĻžāύ⧠āĻāϞā§āϞā§āĻ āĻāϰāĻž āĻšā§āĨ¤
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
āϏāĻāĻā§āϝāĻž: āϝā§āĻā§āύ⧠āϏāĻāĻā§āϝāĻžāϏā§āĻāĻ āĻāĻā§āϏāĻĒā§āϰā§āĻļāύ āϝāĻžāϰ āĻā§āύāĻā§āύā§āĻ āĻāĻŖāύāĻž āĻāϰāϤ⧠āĻāĻžāύ (āϰā§āĻĄāĻŋā§āĻžāύā§)āĨ¤
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 āĻāĻ āĻāĻĻāĻžāĻšāϰāĻŖā§, āύāĻŋāĻā§āϰ āĻāύā§āĻā§āϰāĻŋāĻāĻŋ āϏāĻŽāĻā§āύ⧠āϤā§āϰāĻŋāĻā§āĻā§āϰ āĻāύā§āϝ āϏāĻŽā§āĻāĻžāĻŦā§āϝ:
REM āĻā§āύā§āϰ āĻŦāĻŋāĻĒāϰā§āϤ āĻŦāĻžāĻšā§ āĻāĻŦāĻ āĻā§āύ āϏāĻāĻļā§āϞāĻŋāώā§āĻ āĻŦāĻžāĻšā§āϰ āĻĻā§āϰā§āĻā§āϝ āĻāĻŖāύāĻž āĻāϰāĻžāϰ āĻāύā§āϝ āĻā§āύ (āĻĄāĻŋāĻā§āϰāĻŋāϤā§):
Sub ExampleTangens
REM Pi = 3.1415926 āĻĒā§āϰā§āĻŦāĻŋāύāĻŋāϰā§āϧāĻžāϰāĻŋāϤ āĻā§āϰāĻŋā§ā§āĻŦāϞ
Dim d1 As Double
Dim dAlpha As Double
d1 = InputBox("Enter the length of the side opposite the angle: ","opposite")
ddAlpha = 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