Last change
on this file since 142 was
117,
checked in by rosiere, 15 years ago
|
1) Platforms : add new organization for test
2) Load_Store_Unit : add array to count nb_check in store_queue
3) Issue_queue and Core_Glue : rewrite the issue network
4) Special_Register_Unit : add reset value to register CID
5) Softwares : add multicontext test
6) Softwares : add SPECINT
7) Softwares : add MiBench?
7) Read_queue : inhib access for r0
8) Change Core_Glue (network) - dont yet support priority and load balancing scheme
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
773 bytes
|
Rev | Line | |
---|
[117] | 1 | /* +++Date last modified: 05-Jul-1997 */ |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | ** RAD2DEG.C - Functions to convert between radians and degrees |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | #include <math.h> |
---|
| 8 | #include "basicmath-snipmath.h" |
---|
| 9 | |
---|
| 10 | #undef rad2deg /* These are macros defined in PI.H */ |
---|
| 11 | #undef deg2rad |
---|
| 12 | |
---|
| 13 | double rad2deg(double rad) |
---|
| 14 | { |
---|
| 15 | return (180.0 * rad / (PI)); |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | double deg2rad(double deg) |
---|
| 19 | { |
---|
| 20 | return (PI * deg / 180.0); |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | #ifdef TEST |
---|
| 24 | |
---|
| 25 | #include <stdio.h> |
---|
| 26 | |
---|
| 27 | main() |
---|
| 28 | { |
---|
| 29 | double X; |
---|
| 30 | |
---|
| 31 | for (X = 0.0; X <= 360.0; X += 45.0) |
---|
| 32 | printf("%3.0f degrees = %.12f radians\n", X, deg2rad(X)); |
---|
| 33 | puts(""); |
---|
| 34 | for (X = 0.0; X <= (2 * PI + 1e-6); X += (PI / 6)) |
---|
| 35 | printf("%.12f radians = %3.0f degrees\n", X, rad2deg(X)); |
---|
| 36 | return 0; |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | #endif /* TEST */ |
---|
Note: See
TracBrowser
for help on using the repository browser.