From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03080103.xhp | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03080103.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03080103.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03080103.xhp b/helpcontent2/source/text/sbasic/shared/03080103.xhp new file mode 100644 index 000000000..bc3a81c2b --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03080103.xhp @@ -0,0 +1,75 @@ + + + + + + + Sin Function + /text/sbasic/shared/03080103.xhp + + + + + + +
+ + Sin function + + + +Sin Function +Returns the sine of an angle. The angle is specified in radians. The result lies between -1 and 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 + +Syntax: + +Sin (Number) + + +Return value: +Double + +Parameters: + Number: Numeric expression that defines the angle in radians that you want to calculate the sine for. +To convert degrees to radians, multiply degrees by Pi/180, and to convert radians to degrees, multiply radians by 180/Pi. +grad=(radiant*180)/pi +radiant=(grad*pi)/180 +Pi is approximately 3.141593. + + + +Example: + +' In this example, the following entry is possible for a right-angled triangle: +' The side opposite the angle and the angle (in degrees) to calculate the length of the hypotenuse: +Sub ExampleSine +' Pi = 3.1415926 is a predefined variable +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 + + + +
\ No newline at end of file -- cgit v1.2.3