![]() |
|
#1
|
|||
|
|||
Changing Radians to DegreesI'm currently working on a program that uses sine functions that involve degrees. How do you change it so that your computer calculates in degrees instead of radians?
|
|
#2
|
|||
|
|||
Re: Changing Radians to DegreesQuote:
If you want to write a program using the standard C library sin() to calculate the sine of a value, the value must be in radians. If you are given a value in degrees, you must convert the value to radians. Code:
Where the number of radians per degree is equal to pi/180. Now, the C language doesn't know about pi, so you must tell it. CPP / C++ / C Code:
Output: Code:
Regards, Dave Last edited by davekw7x : 23-Dec-2006 at 17:38.
|
|
#3
|
|||
|
|||
Re: Changing Radians to DegreesThanks. a lot that helps
|
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing Text Colors Or Look In C++ | mfm1983 | C++ Forum | 4 | 19-Dec-2006 06:27 |
| Convert Fahrenheit to Celsius and Kelvin | ajguerrero | C Programming Language | 2 | 19-Apr-2006 06:58 |
| Changing PHP list link color | crystalattice | Web Design Forum | 4 | 20-Jan-2006 22:54 |
| Changing focus from one tab to another tab control | vijji | MS Visual C++ / MFC Forum | 1 | 23-Nov-2005 07:14 |
| changing colour of individual items of control created through CListCtrl | Sadia | MS Visual C++ / MFC Forum | 0 | 01-Jul-2005 08:09 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The