Results 1 to 9 of 9

Thread: Converting Radials to Degrees

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Posts
    24

    Post

    I'm currently designing a program to do some calculations including the tangent, sine and cosine. My problem is that the corresponding functions give an output in radials and I want it in degrees. How do I convert, and if that is not possible, how do I write my own function for calculating the tangent, sine and cosine?



    ------------------
    Doomstar
    http://come.to/Doomstar

  2. #2
    Member
    Join Date
    Jan 2000
    Location
    Southbridge, MA, USA
    Posts
    40

    Post

    As I recall, 2*pi radians = 360 degrees, so if the answer is 1 radian then it is 180/pi degrees, etc...

  3. #3
    Guest

    Post

    This is a good explanation.

    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.


  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Posts
    24

    Post

    Sorry, but I got something like -15 when I tried to calculate the tangent of 50 degrees.
    I used this code to get to it:
    pi = 4 * Atn(1)
    a = tan(50) ' = -0.2719 radians
    b = a * (180/pi)
    Could you please tell me what I'm doing wrong?

  5. #5
    Member
    Join Date
    Jan 2000
    Location
    Southbridge, MA, USA
    Posts
    40

    Post

    The input value for the tan() function is in radians, so
    const pi as double = 3.1415926536 'or however precise you want it
    tan(50*180/pi)=2.012...

    --Carl

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Posts
    24

    Post

    I now know how to do it...
    And I also found out I asked the wrong question. I meant, how do I use the Tan() function with in- and output in degrees.
    Through some determination, luck and mostly your advice I discovered that it can be done like this:

    pi = 4 * Atn(1)
    a = Tan(50 * (pi /180))

    this way a is the output in degrees (1.19...) and 50 the input in degrees.


    Thanks for your help,


    ------------------
    Doomstar
    http://surf.to/Doomstar

  7. #7
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Post

    And it's name is radian, not radial.

  8. #8
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Post

    This is the kind of code I really want to get into. I want to use it for a graphics program I've been developing.Where can I find like tons of graphical formulas(or maybe even a couple of pounds)?
    Thanks,
    Joey O.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Posts
    24

    Post

    hey Juan Carlos, I think you maybe could have figured out that I knew that after the first reply. changing the topic isn't possible, so I can't correct my stupid mistake.
    as for joey, the site Boothman_7 mentioned ( http://math.usask.ca/readin/examples/rmoa_eg1.html ) could be a good one to visit. if I knew other sites to visit, I'd tell 'em, but I just don't. Sorry...




    ------------------
    Doomstar
    http://surf.to/Doomstar

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