•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 401,495 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,170 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 1532 | Replies: 2
![]() |
•
•
Join Date: Sep 2004
Location: Overflow State
Posts: 183
Reputation:
Rep Power: 5
Solved Threads: 4
Greetings ray96,
Mathematics in C is not difficult to use. For example, lets take this word problem for example:
Note: Since 360° = 2 radians, then 180° = radians.
We will use this fact to convert between degrees and radians.
» Convert 5/12 radians to degrees.
Lets take a simple approach:
Step 1: 5 rads / 12
Step 2: 180 degs / rads
Step 3: 5 x 180degs / 12
Step 4: 75 degrees
Doing this in C wont be hard at all:
This algorithm may not be perfect, but its a good start. If you have any further questions please feel free to ask.
- Stack Overflow
Mathematics in C is not difficult to use. For example, lets take this word problem for example:
Note: Since 360° = 2 radians, then 180° = radians.
We will use this fact to convert between degrees and radians.
» Convert 5/12 radians to degrees.
Lets take a simple approach:
Step 1: 5 rads / 12
Step 2: 180 degs / rads
Step 3: 5 x 180degs / 12
Step 4: 75 degrees
Doing this in C wont be hard at all:
int radToDegrees(int radians) { float s1; s1 = (radians * 180.0f) / 12.0f; return (int)s1; }
This algorithm may not be perfect, but its a good start. If you have any further questions please feel free to ask.
- Stack Overflow
Following the rules will ensure you get a prompt answer to your question. If posting code, please include BB [code][/code] tags. Your question may have been asked before, try the search facility.
IRC
Channel: irc.daniweb.com
Room: #c, #shell
IRC
Channel: irc.daniweb.com
Room: #c, #shell
![]() |
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Weird problem with float or double.... (Python)
- hi I need someone to assist me :) (C++)
- mouseover not working (help) (OS X)
- serious crashing problem in Visual C++ 6.0 (C++)
- Problem with Turbo C...or so I think!! (C++)
- AOL/router connection problem with msn messenger (Networking Hardware Configuration)
- Problem loading 'geocities' pages on my machine (Web Browsers)
- .htaccess not working.! (Linux Servers and Apache)
- aim profile problem (Web Browsers)
Other Threads in the C Forum
- Previous Thread: A puzzl about function
- Next Thread: Need to make program access a data base primary key number entered by user



Linear Mode