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)

рд╡рд╛рдкрд╕реА рдореВрд▓реНрдп:

рджреЛрдЧреБрдирд╛

рдкреИрд░рд╛рдореАрдЯрд░

Number: Numeric expression that defines the angle in radians that you want to calculate the sine for.

рдбрд┐рдЧреНрд░реА рдХреЛ рд░реЗрдбрд┐рдпрди рдореЗрдВ рдмрджрд▓рдиреЗ рдХреЗ рд▓рд┐рдП, рдбрд┐рдЧреНрд░реА рдХреЛ Pi/180 рд╕реЗ рдЧреБрдгрд╛ рдХрд░реЗрдВ. рд░реЗрдбрд┐рдпрди рдХреЛ рдбрд┐рдЧреНрд░реА рдореЗрдВ рдмрджрд▓рдиреЗ рдХреЗ рд▓рд┐рдП, рд░реЗрдбрд┐рдпрди рдХреЛ 180/Pi рд╕реЗ рдЧреБрдгрд╛ рдХрд░реЗрдВ.

grad=(radiant*180)/pi

radiant=(grad*pi)/180

Pi is approximately 3.141593.

Error codes:

5 Invalid procedure call

рдЙрджрд╛рд╣рд░рдг:


' 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