Advertisement
tuldok89

Untitled

Oct 13th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  4.         Dim sin As Double = Math.Sin(deg2rad(45)) ' get the sine of 45 degrees
  5.        Dim asin As Double = Math.Asin(sin)       ' get the arcsin() of sin(45)
  6.        MsgBox(rad2deg(asin))                     ' result in degrees
  7.    End Sub
  8.  
  9.     Function deg2rad(ByVal n As Double) As Double
  10.         Return n * (Math.PI / 180)
  11.     End Function
  12.  
  13.     Function rad2deg(ByVal n As Double) As Double
  14.         Return n * (180 / Math.PI)
  15.     End Function
  16. End Class
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement