Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- Dim sin As Double = Math.Sin(deg2rad(45)) ' get the sine of 45 degrees
- Dim asin As Double = Math.Asin(sin) ' get the arcsin() of sin(45)
- MsgBox(rad2deg(asin)) ' result in degrees
- End Sub
- Function deg2rad(ByVal n As Double) As Double
- Return n * (Math.PI / 180)
- End Function
- Function rad2deg(ByVal n As Double) As Double
- Return n * (180 / Math.PI)
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement