Sin Function
๊ฐ๋์ ์ฌ์ธ์ ๊ตฌํฉ๋๋ค. ๊ฐ๋๋ ๋ผ๋์์ผ๋ก ์ง์ ๋ฉ๋๋ค. ๊ฒฐ๊ณผ๋ -1์์ 1 ์ฌ์ด์ ๋๋ค.
Sin ํจ์๋ ์ง๊ฐ ์ผ๊ฐํ์์ ๋น๋ณ์ ๊ธธ์ด์ ๋ํด ๊ฐ๋ Alpha์ ๋ง์ฃผ๋ณด๋ ๋ณ์ ๊ธธ์ด ๋น์จ์ ๊ตฌํฉ๋๋ค.
Sin(Alpha) = side opposite the angle/hypotenuse
๊ตฌ๋ฌธ:
Sin (Number)
๋ฐํ ๊ฐ:
Double
๋งค๊ฐ ๋ณ์:
Number: ์ฌ์ธ์ ๊ณ์ฐํ ๊ฐ๋๋ฅผ ๋ผ๋์์ผ๋ก ์ง์ ํ๋ ์ซ์ ์์ ๋๋ค.
๋๋ฅผ ๋ผ๋์์ผ๋ก ๋ณํํ๋ ค๋ฉด ๋์ Pi/180์ ๊ณฑํฉ๋๋ค. ๋ผ๋์์ ๋๋ก ๋ณํํ๋ ค๋ฉด ๋ผ๋์์ 180/Pi๋ฅผ ๊ณฑํฉ๋๋ค.
grad=(radiant*180)/pi
radiant=(grad*pi)/180
Pi๋ ์ฝ 3.141593์ ๋๋ค.
์:
REM In this example, the following entry is possible for a right-angled triangle:
REM The side opposite the angle and the angle (in degrees) to calculate the length of the hypotenuse:
Sub ExampleSine
REM 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$("์ํ ๊ฐ๋(๋ ๋จ์) ์ ๋ ฅ: ","Alpha")
Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180))
End Sub