Cos Function

๊ฐ๋„์˜ ์ฝ”์‚ฌ์ธ์„ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. ๊ฐ๋„๋Š” ๋ผ๋””์•ˆ์œผ๋กœ ์ง€์ •๋ฉ๋‹ˆ๋‹ค. ๊ฒฐ๊ณผ๋Š” -1์—์„œ 1 ์‚ฌ์ด์ž…๋‹ˆ๋‹ค.

Using the angle Alpha, the Cos function calculates the ratio of the length of the side that is adjacent to the angle, divided by the length of the hypotenuse in a right-angled triangle.

Cos(Alpha) = Adjacent/Hypotenuse

Syntax:


Cos (Number As Double) As Double

Return value:

Double

Parameters:

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

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

degree=(radian*180)/pi

radian=(degree*pi)/180

Pi is here the fixed circle constant with the rounded value 3.14159...

Error codes:

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

Example:


REM The following example allows for a right-angled triangle the input of
REM ์‹œ์ปจํŠธ ๋ฐ ๊ฐ๋„(๋„ ๋‹จ์œ„)๋Š” ๋น—๋ณ€์˜ ๊ธธ์ด๋ฅผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
Sub ExampleCosinus
REM rounded Pi = 3.14159
Dim d1 As Double, dAngle As Double
    d1 = InputBox$ (""Enter the length of the adjacent side: ","Adjacent")
    dAngle = InputBox("Enter the angle Alpha (in degrees): ","Alpha")
    Print "The length of the hypotenuse is"; (d1 / cos (dAngle * Pi / 180))
End Sub

Please support us!