![]() |
|
#1
|
|||
|
|||
Really amatuer to C++, trigonometry troubleHeya all,
I'm really not very good at C++ at all, the most that I do is dabble in it, but at the moment I'm just trying to set up a program where I can do some trigonometry a lot easier than having to use a scientific calculator. The problem that I'm having is with using arctan, arc-cosine and arcsine. normal tan(x*Pi/180) is working fine (as I know you have to convert into radians), but the problem is that no matter how I enter my value to use as atan(x) it doesn't give a corrent answer. I've tried entering it as radians, both converting it before and by using: atan(x*Pi/180) and I've also tried the other way, converting from radians to decimal again, using x*180/pi I just can't seem to get any answer that is correct out of it. Sorry if this seems like a really simple thing to most, but I just can't get it to work. |
|
#2
|
|||
|
|||
|
Quote:
All trig function angles are in radians, just as a real mathematician would do it. CPP / C++ / C Code:
Regards, Dave |
|
#3
|
|||
|
|||
|
Thanks dave, thats cleared it up a hell of a lot for me
Going to break out my old maths work books from A-level and try to remember how to do radians |
Recent GIDBlog
Developing GUIs with wxPython (Part 4) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Binary Tree Trouble | neufunk | C Programming Language | 4 | 06-Dec-2004 09:52 |
| C programming trouble | Newworld | C Programming Language | 8 | 12-Sep-2004 23:06 |
| Ram Trouble Please HELP | ademnaz | Computer Hardware Forum | 3 | 10-Sep-2004 20:39 |
| Having trouble trying to format C: | Nickster64 | Computer Software Forum - Windows | 2 | 27-Jul-2004 07:31 |
| Trouble with htdocs on network drive. | kibboy | Apache Web Server Forum | 0 | 11-Nov-2003 08:22 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The