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

Return value:

Double

Parameters:

āϏāĻ‚āĻ–ā§āϝāĻž: āϏāĻ‚āĻ–ā§āϝāĻžāϏ⧂āϚāĻ• āĻāĻ•ā§āϏāĻĒā§āϰ⧇āĻļāύ āϝāĻž āϰ⧇āĻĄāĻŋ⧟āĻžāύ⧇ āϕ⧋āύ āĻĒā§āϰāĻ•āĻžāĻļ āĻ•āϰ⧇ āĻĨāĻžāϕ⧇ āĻāĻŦāĻ‚ āϝāĻžāϰ āϏāĻžāχāύ āĻ—āĻŖāύāĻž āĻ•āϰāϤ⧇ āϚāĻžāύāĨ¤

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.

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

Please support us!