CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Dec 2002
    Location
    NC
    Posts
    125

    radians vs degrees(Resolved)

    Im trying to get the Log() of the number in VB. After messing with the formula for a while I realized I could not get the same answer on the simplist number as I would with the M.S. calculator. It was then I figured out that by default, the Deg. is checked in calculator scientific view, when I checked Radians and ran my numbers I got the same answer as VB was giving me. What that tells me is that VB uses the Radians to give the Log() of a number. What I want to do is get the Degrees answer in VB, (the same answer I get in calculator with Degrees.)
    Can anyone help?

    Here is the code if it helps
    Code:
    Dim gain1 As Single
    Dim gain2 As Single
    Dim gain3 As Single
    gain1 = 1.0666 * 1.0666 * 12 * .2126
    gain2 = Log(gain1) ' Log of gain1 should be .4627 but its not in VB
    gain3 = 11.8 + (10 * gain2)
    t_gain.Text = gain3 ' this number should be 16.42 in VB but VB shows something very different
    Thanks
    Last edited by dedub; October 6th, 2006 at 09:52 PM.
    R.L.T.W. A+, NET+, CCNA

    doin' my best

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured