Cos Function

κ°λ„μ˜ 코사인을 κ³„μ‚°ν•©λ‹ˆλ‹€. κ°λ„λŠ” λΌλ””μ•ˆμœΌλ‘œ μ§€μ •λ©λ‹ˆλ‹€. κ²°κ³ΌλŠ” -1μ—μ„œ 1 μ‚¬μ΄μž…λ‹ˆλ‹€.

Cos ν•¨μˆ˜λŠ” 각도 Alpha와 μΈμ ‘ν•œ λ°‘λ³€μ˜ 길이λ₯Ό 직각 μ‚Όκ°ν˜•μ˜ λΉ—λ³€ 길이둜 λ‚˜λˆˆ λΉ„μœ¨μ„ κ³„μ‚°ν•©λ‹ˆλ‹€.

Cos(Alpha) = Adjacent/Hypotenuse

ꡬ문:

Cos (Number)

λ°˜ν™˜ κ°’:

Double

맀개 λ³€μˆ˜:

Number: 코사인을 계산할 각도λ₯Ό λΌλ””μ•ˆμœΌλ‘œ μ§€μ •ν•˜λŠ” 숫자 μ‹μž…λ‹ˆλ‹€.

도λ₯Ό λΌλ””μ•ˆμœΌλ‘œ λ³€ν™˜ν•˜λ €λ©΄ 도에 pi/180을 κ³±ν•©λ‹ˆλ‹€. λΌλ””μ•ˆμ„ λ„λ‘œ λ³€ν™˜ν•˜λ €λ©΄ λΌλ””μ•ˆμ— 180/piλ₯Ό κ³±ν•©λ‹ˆλ‹€.

degree=(radian*180)/pi

radian=(degree*pi)/180

μ—¬κΈ°μ—μ„œ PiλŠ” 3.14159... λ₯Ό λ°˜μ˜¬λ¦Όν•œ 값을 κ°–λŠ” κ³ μ • μ›μ£Όμœ¨μž…λ‹ˆλ‹€.

Error codes:

5 잘λͺ»λœ ν”„λ‘œμ‹œμ € ν˜ΈμΆœμž…λ‹ˆλ‹€.

예:

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 hypothenuse is"; (d1 / cos (dAngle * Pi / 180))

End Sub