]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_menu_functions.cpp
Provide a better(?) solution to the windows GDI problem
[flightgear.git] / src / FDM / UIUCModel / uiuc_menu_functions.cpp
1
2 #include "uiuc_menu_functions.h"
3
4 bool check_float( const string &token)
5 {
6   float value;
7   istrstream stream(token.c_str()); 
8   return (stream >> value);
9 }
10
11 void d_2_to_3( double array2D[100][100], double array3D[][100][100], int index3D)
12 {
13   for (register int i=0; i<=99; i++)
14     {
15       for (register int j=1; j<=99; j++)
16         {
17           array3D[index3D][i][j]=array2D[i][j];
18         }
19     }
20 }
21
22 void d_1_to_2( double array1D[100], double array2D[][100], int index2D)
23 {
24   for (register int i=0; i<=99; i++)
25     {
26       array2D[index2D][i]=array1D[i];
27     }
28 }
29
30 void d_1_to_1( double array1[100], double array2[100] )
31 {
32   for (register int i=0; i<=99; i++)
33     {
34       array2[i]=array1[i];
35     }
36 }
37
38 void i_1_to_2( int array1D[100], int array2D[][100], int index2D)
39 {
40   for (register int i=0; i<=99; i++)
41     {
42       array2D[index2D][i]=array1D[i];
43     }
44 }