Results 1 to 6 of 6

Thread: Trig Funtions

  1. #1

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327

    Trig Funtions

    Is there any possible way to get the Sin, Tan, and Cos in Degrees instead of the VB's default of Radians? Or have a home-made funtions to do all 3 forms? (Grads, Deg, & Rad)

    I haven't found anything through search so that's why I'm asking.
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    From looking on the internet, the formula looks something like this:

    VB Code:
    1. MsgBox Sin(6) * (180 / 3.14159)

    Maybe you could try the maths forum...

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    703
    deg = 180*rad/pi
    an ending

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    So:

    VB Code:
    1. MsgBox 180 * (Sin(6) / 3.14159)

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  5. #5
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    703
    You want to transform the input into sin into degrees from radians. Sin just outputs a number in the range [-1,1]
    an ending

  6. #6
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431
    Actually, it is Sin([x deg]*pi/180). Check it with your calculator:

    x = 180 in this case
    In degrees: Sin(180) = 0
    In radians: Sin(180pi/180) = Sin(pi) = 0

    Azteched was correct
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

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