LibreOffice 25.2 Help
āĻāĻāĻāĻŋ āĻā§āύā§āϰ āϏāĻžāĻāύ āĻĒā§āϰāĻĻāĻžāύ āĻāϰ⧠āĻĨāĻžāĻā§āĨ¤ āĻā§āύāĻāĻŋ āϰā§āĻĄāĻŋā§āĻžāύ⧠āĻāϞā§āϞā§āĻāĻŋāϤ āĻšā§āĨ¤ āĻĢāϞāĻžāĻĢāϞ -1 āĻāĻŦāĻ 1 āĻāϰ āĻŽāϧā§āϝ⧠āĻŦāĻŋāĻĻā§āϝāĻŽāĻžāύāĨ¤
Using the angle Alpha, the Sin function returns the ratio of the length of the opposite side of an angle to the length of the hypotenuse in a right-angled triangle.
Sin(Alpha) = side opposite the angle/hypotenuse
Sin (Number As Double) As Double
Double
āϏāĻāĻā§āϝāĻž: āϏāĻāĻā§āϝāĻžāϏā§āĻāĻ āĻāĻā§āϏāĻĒā§āϰā§āĻļāύ āϝāĻž āϰā§āĻĄāĻŋā§āĻžāύ⧠āĻā§āύ āĻĒā§āϰāĻāĻžāĻļ āĻāϰ⧠āĻĨāĻžāĻā§ āĻāĻŦāĻ āϝāĻžāϰ āϏāĻžāĻāύ āĻāĻŖāύāĻž āĻāϰāϤ⧠āĻāĻžāύāĨ¤
To convert degrees to radians, multiply degrees by Pi/180, and to convert radians to degrees, multiply radians by 180/Pi.
degrees=(radians*180)/Pi
radians=(degrees*Pi)/180
Pi is approximately 3.141593.
REM āĻāĻ āĻāĻĻāĻžāĻšāϰāĻŖā§, āύāĻŋāĻā§āϰ āĻāύā§āĻā§āϰāĻŋāĻāĻŋ āϏāĻŽāĻā§āύ⧠āϤā§āϰāĻŋāĻā§āĻā§āϰ āĻāύā§āϝ āϏāĻŽā§āĻāĻžāĻŦā§āϝ:
REM āĻā§āύā§āϰ āĻŦāĻŋāĻĒāϰā§āϤ āĻŦāĻžāĻšā§ āĻāĻŦāĻ āĻ
āϤāĻŋāĻā§āĻā§āϰ āĻĻā§āϰā§āĻā§āϝ āĻāĻŖāύāĻž āĻāϰāĻžāϰ āĻāύā§āϝ āĻā§āύ (āĻĄāĻŋāĻā§āϰāĻŋāϤā§):
Sub ExampleSine
REM Pi = 3.1415926 āĻāĻāĻāĻŋ āĻĒā§āϰā§āĻŦāύāĻŋāϰā§āϧāĻžāϰāĻŋāϤ āĻā§āϰāĻŋā§ā§āĻŦāϞ
Dim d1 As Double
Dim dAlpha As Double
d1 = InputBox("Enter the length of the opposite side: ","Opposite Side")
dAlpha = InputBox("Enter the angle Alpha (in degrees): ","Alpha")
Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180))
End Sub