3 {%ToDo 'AlgoWars.todo'}
\r
4 {%ToDo 'AlgoWars.test_vectores.todo'}
\r
8 ObjetosVoladores in 'ObjetosVoladores.pas',
\r
9 Vectores in 'Vectores.pas',
\r
10 Objeto in 'Objeto.pas',
\r
11 Tipos in 'Tipos.pas';
\r
17 v: array [1..MAX] of cVector;
\r
23 assignFile( fo, 'log.txt' );
\r
25 v[1] := cVector.Create; // O
\r
26 v[2] := cVector.Create( 1, pi / 2, 0 ); // j
\r
27 v[3] := cVector.Create( v[2] ); // j
\r
28 v[4] := cVector.Create( 0, 1, 0 ); // j
\r
29 v[5] := cVector.Create( -3473, 67100, 12249 );
\r
30 v[6] := cVector.Create( -3473, 67100, 12249 );
\r
32 v[7] := cVector.Create( -3473, 67100, 12249 );
\r
33 v[7].mMultiplicar( v[4] ); // k
\r
34 v[8] := cVector.Create( v[5] );
\r
35 v[8].mAddModulo( 10 );
\r
36 v[9] := cVector.Create( v[8] );
\r
37 v[9].mSetModulo( 10 );
\r
38 v[10] := cVector.Create( v[9] );
\r
39 v[10].mMultiplicarPor( 0.1 );
\r
40 v[11] := cVector.Create( v[10] );
\r
42 v[12] := cVector.Create( v[9] );
\r
43 v[12].mMultiplicar( 1.5 );
\r
44 v[13] := cVector.Create( v[9] );
\r
45 v[13].mSumar( v[4] );
\r
46 v[14] := cVector.create( -1, 1, 0 );
\r
47 writeln( fo, 'v[5].v[5]: ' + floatToStr( v[5].mMultiplicarEsc( v[5] ) ) );
\r
48 writeln( fo, 'v[3].v[4]: ' + floatToStr( v[3].mMultiplicarEsc( v[4] ) ) );
\r
49 for i := 1 to MAX do begin
\r
50 writeln( fo, 'VECTOR ' + IntToStr( i ) + ': ' + #13 + #10 + v[i].mGetDebugInfo + #13 + #10 );
\r