# Sin Function

āĻāĻāĻāĻŋ āĻā§āĻ¨ā§āĻ° āĻ¸āĻžāĻāĻ¨ āĻĒā§āĻ°āĻĻāĻžāĻ¨ āĻāĻ°ā§ āĻĨāĻžāĻā§āĨ¤ āĻā§āĻ¨āĻāĻŋ āĻ°ā§āĻĄāĻŋā§āĻžāĻ¨ā§ āĻāĻ˛ā§āĻ˛ā§āĻāĻŋāĻ¤ āĻšā§āĨ¤ āĻĢāĻ˛āĻžāĻĢāĻ˛ -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

### Syntax:

``````
Sin (Number As Double) As Double
``````

Double

### Parameters:

āĻ¸āĻāĻā§āĻ¯āĻž: āĻ¸āĻāĻā§āĻ¯āĻžāĻ¸ā§āĻāĻ āĻāĻā§āĻ¸āĻĒā§āĻ°ā§āĻļāĻ¨ āĻ¯āĻž āĻ°ā§āĻĄāĻŋā§āĻžāĻ¨ā§ āĻā§āĻ¨ āĻĒā§āĻ°āĻāĻžāĻļ āĻāĻ°ā§ āĻĨāĻžāĻā§ āĻāĻŦāĻ āĻ¯āĻžāĻ° āĻ¸āĻžāĻāĻ¨ āĻāĻŖāĻ¨āĻž āĻāĻ°āĻ¤ā§ āĻāĻžāĻ¨āĨ¤

To convert degrees to radians, multiply degrees by Pi/180, and to convert radians to degrees, multiply radians by 180/Pi.

Pi is approximately 3.141593.

### Error codes:

5 Invalid procedure call

### Example:

``````
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
``````