program AlgoWars; {$APPTYPE CONSOLE} {%ToDo 'AlgoWars.todo'} {%ToDo 'AlgoWars.test_vectores.todo'} uses SysUtils, ObjetosVoladores in 'ObjetosVoladores.pas', Vectores in 'Vectores.pas', Objeto in 'Objeto.pas', Tipos in 'Tipos.pas'; const MAX = 14; var v: array [1..MAX] of cVector; i: byte; // tmp: string; fo: text; begin assignFile( fo, 'log.txt' ); rewrite( fo ); v[1] := cVector.Create; // O v[2] := cVector.Create( 1, pi / 2, 0 ); // j v[3] := cVector.Create( v[2] ); // j v[4] := cVector.Create( 0, 1, 0 ); // j v[5] := cVector.Create( -3473, 67100, 12249 ); v[6] := cVector.Create( -3473, 67100, 12249 ); v[6].mHacerVersor; v[7] := cVector.Create( -3473, 67100, 12249 ); v[7].mMultiplicar( v[4] ); // k v[8] := cVector.Create( v[5] ); v[8].mAddModulo( 10 ); v[9] := cVector.Create( v[8] ); v[9].mSetModulo( 10 ); v[10] := cVector.Create( v[9] ); v[10].mMultiplicarPor( 0.1 ); v[11] := cVector.Create( v[10] ); v[11].mAddX( 1.5 ); v[12] := cVector.Create( v[9] ); v[12].mMultiplicar( 1.5 ); v[13] := cVector.Create( v[9] ); v[13].mSumar( v[4] ); v[14] := cVector.create( -1, 1, 0 ); writeln( fo, 'v[5].v[5]: ' + floatToStr( v[5].mMultiplicarEsc( v[5] ) ) ); writeln( fo, 'v[3].v[4]: ' + floatToStr( v[3].mMultiplicarEsc( v[4] ) ) ); for i := 1 to MAX do begin writeln( fo, 'VECTOR ' + IntToStr( i ) + ': ' + #13 + #10 + v[i].mGetDebugInfo + #13 + #10 ); v[i].free; end; closeFile( fo ); end.