Inverse COS Inverse SIN Visual Basic VB

Januari 26, 2011 at 12:52 pm Tinggalkan komentar

Private Sub Command1_Click()
Cls
masukan = Val(Text1.Text)
Print “Inv sin ” & masukan & ” = “; arcsin(masukan) & ” radian ”
Print “Dalam derajat = “; R2D(arcsin(masukan))
Print
Print “Inv cos ” & masukan & ” = “; arccos(masukan) & ” radian ”
Print “Dalam derajat = “; R2D(arccos(masukan))
Print
Print “Inv Tan ” & masukan & ” = “; Atn(masukan) & ” radian ”
Print “Dalam derajat = “; R2D(Atn(masukan))

End Sub

Public Function D2R(ByVal Angle As Single) As Single
Pi = Atn(1) * 4
D2R = Angle / 180 * Pi
End Function
Public Function arcsin(ByVal Y As Single) As Single
arcsin = Atn(Y / Sqr(1 – Y * Y))

End Function

Public Function arccos(ByVal Y As Single) As Single
Pi = Atn(1) * 4
arccos = -Atn(Y / Sqr(1 – Y * Y)) + Pi / 2
End Function

Public Function R2D(ByVal Angle As Single) As Single
Pi = Atn(1) * 4
R2D = (Angle * 180) / Pi
End Function

Entry filed under: Automation. Tags: , , , , , , , .

Cara kerja Plasma cutting Menghitung Beban Maksimum Aktuator..

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Blog Stats

  • 12,733 hits

Kategori

Pos-pos Terbaru


%d blogger menyukai ini: