Tan Function

๊ฐ๋„์˜ ํƒ„์  ํŠธ ๊ฐ’์„ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ๋„๋Š” ๋ผ๋””์•ˆ ๋‹จ์œ„๋กœ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

Tan ํ•จ์ˆ˜๋Š” ์ง๊ฐ ์‚ผ๊ฐํ˜•์—์„œ ๊ฐ๋„ Alpha์™€ ์ธ์ ‘ํ•œ ๋ณ€์˜ ๊ธธ์ด์— ๋Œ€ํ•ด ๊ฐ๋„ Alpha์™€ ๋งˆ์ฃผ๋ณด๋Š” ๋ณ€์˜ ๊ธธ์ด ๋น„์œจ์„ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.

Tan(Alpha) = side opposite the angle/side adjacent to angle

๊ตฌ๋ฌธ:

Tan (Number)

๋ฐ˜ํ™˜ ๊ฐ’:

Double

๋งค๊ฐœ ๋ณ€์ˆ˜:

Number: ๋ผ๋””์•ˆ์œผ๋กœ ์ง€์ •ํ•œ ํƒ„์  ํŠธ๋ฅผ ๊ณ„์‚ฐํ•  ์ž„์˜์˜ ์ˆซ์ž ์‹์ž…๋‹ˆ๋‹ค.

๋„๋ฅผ ๋ผ๋””์•ˆ์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋ ค๋ฉด ๋„์— Pi/180์„ ๊ณฑํ•ฉ๋‹ˆ๋‹ค. ๋ผ๋””์•ˆ์„ ๋„๋กœ ๋ณ€ํ™˜ํ•˜๋ ค๋ฉด ๋ผ๋””์•ˆ์— 180/Pi๋ฅผ ๊ณฑํ•ฉ๋‹ˆ๋‹ค.

๋„=(๋ผ๋””์•ˆ*180)/Pi

๋ผ๋””์•ˆ=(๋„*Pi)/180

Pi๋Š” ์•ฝ 3.141593์ž…๋‹ˆ๋‹ค.

Error codes:

5 ์ž˜๋ชป๋œ ํ”„๋กœ์‹œ์ € ํ˜ธ์ถœ์ž…๋‹ˆ๋‹ค.

์˜ˆ:

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 side adjacent to the angle:

Sub ExampleTangens

REM Pi = 3.1415926 is a pre-defined variable

Dim d1 As Double

Dim dAlpha As Double

    d1 = InputBox("Enter the length of the side opposite the angle: ","opposite")

    dAlpha = InputBox("Enter the Alpha angle (in degrees): ","Alpha")

    Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))

End Sub