Sin Function

Vraća sinus kuta. Kut je zadan u radijanima. Rezultat se nalazi između -1 i 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:

Number: Numeric expression that defines the angle in radians that you want to calculate the sine for.

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 U ovom primjeru,  sljedeći unos je moguć za desnokutni trokut:
REM Nasuprotna stranica i kut ( u stupnjevima) da bi izraÄŤunali duljinu hipotenuze
Sub ExampleSine
REM Pi = 3.1415926 je predefinirana varijabla
Dim d1 As Double
Dim dAlpha As Double
    d1 = InputBox("Unesi vrijednost nasuprotne stranice: ","Opposite Side")
    dAlpha = InputBox("Unesi vrijednost kuta alfa (u stupnjevima): ","Alpha")
    Print "Duljina hipotenuze je"; (d1 / sin (dAlpha * Pi / 180))
End Sub

Please support us!