| 1 |
/********************************************************************** |
| 2 |
|
| 3 |
FILENAME: uiuc_convert.cpp |
| 4 |
|
| 5 |
---------------------------------------------------------------------- |
| 6 |
|
| 7 |
DESCRIPTION: reads conversion type and sets conversion factors |
| 8 |
|
| 9 |
---------------------------------------------------------------------- |
| 10 |
|
| 11 |
STATUS: alpha version |
| 12 |
|
| 13 |
---------------------------------------------------------------------- |
| 14 |
|
| 15 |
REFERENCES: |
| 16 |
|
| 17 |
---------------------------------------------------------------------- |
| 18 |
|
| 19 |
HISTORY: 02/22/2000 initial release |
| 20 |
|
| 21 |
---------------------------------------------------------------------- |
| 22 |
|
| 23 |
AUTHOR(S): Jeff Scott <[email protected]> |
| 24 |
|
| 25 |
---------------------------------------------------------------------- |
| 26 |
|
| 27 |
VARIABLES: |
| 28 |
|
| 29 |
---------------------------------------------------------------------- |
| 30 |
|
| 31 |
INPUTS: -conversion type |
| 32 |
|
| 33 |
---------------------------------------------------------------------- |
| 34 |
|
| 35 |
OUTPUTS: -conversion factor |
| 36 |
|
| 37 |
---------------------------------------------------------------------- |
| 38 |
|
| 39 |
CALLED BY: uiuc_menu.cpp |
| 40 |
|
| 41 |
---------------------------------------------------------------------- |
| 42 |
|
| 43 |
CALLS TO: none |
| 44 |
|
| 45 |
---------------------------------------------------------------------- |
| 46 |
|
| 47 |
COPYRIGHT: (C) 2000 by Michael Selig |
| 48 |
|
| 49 |
This program is free software; you can redistribute it and/or |
| 50 |
modify it under the terms of the GNU General Public License |
| 51 |
as published by the Free Software Foundation. |
| 52 |
|
| 53 |
This program is distributed in the hope that it will be useful, |
| 54 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 55 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 56 |
GNU General Public License for more details. |
| 57 |
|
| 58 |
You should have received a copy of the GNU General Public License |
| 59 |
along with this program; if not, write to the Free Software |
| 60 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 61 |
|
| 62 |
**********************************************************************/ |
| 63 |
|
| 64 |
#include "uiuc_convert.h" |
| 65 |
|
| 66 |
|
| 67 |
double uiuc_convert( int conversionType ) |
| 68 |
{ |
| 69 |
double factor = 1; |
| 70 |
|
| 71 |
switch(conversionType) |
| 72 |
{ |
| 73 |
case 0: |
| 74 |
{ |
| 75 |
/* no conversion, multiply by 1 */ |
| 76 |
factor = 1; |
| 77 |
break; |
| 78 |
} |
| 79 |
case 1: |
| 80 |
{ |
| 81 |
/* convert from degrees to radians */ |
| 82 |
factor = DEG_TO_RAD; |
| 83 |
break; |
| 84 |
} |
| 85 |
}; |
| 86 |
return factor; |
| 87 |
} |
| 88 |
|
| 89 |
// end uiuc_convert.cpp |