LibreOffice 7.3 Help
Returnerar sinus för en vinkel. Vinkeln anges i radianer. Resultatet ligger mellan -1 och 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
Tal: Numeriskt uttryck som definierar den vinkel i radianer som du vill berÀkna sinus för.
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.
' I det hÀr exemplet Àr den hÀr inmatningen möjlig för en högervinklad triangel:
' Sidan mittemot vinkeln och vinkeln (i grader) för att berÀkna lÀngden pÄ hypotenusan:
Sub ExampleSine
' Pi = 3,1415926 Àr en fördefinierad variabel
Dim d1 As Double
Dim dAlpha As Double
d1 = InputBox("Ange lÀngden pÄ sida som befinner sig mittemot: ","Motsatt sida")
dAlpha = InputBox("Ange vinkeln Alfa (i grader): ","Alfa")
Print "Hypotenusans lÀngd Àr"; (d1 / sin (dAlpha * Pi / 180))
End Sub