Janilabo

Untitled

Sep 4th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.57 KB | None | 0 0
  1. {$loadlib pumbaa.dll}
  2.  
  3. const
  4.   METHOD = 0; // 0 = SortTPAFrom
  5.               // 1 = SortSpiral
  6.               // 2 = SortRadar
  7. procedure Test;
  8. var
  9.   center: TPoint;
  10.   t: Integer;
  11.   TPA: TPointArray;
  12. begin
  13.   ClearDebug;
  14.   TPA := TPAFromBox(IntToBox(10, 10, 990, 990));
  15.   if (method <> 2) then
  16.     center := pp_TPACenter(TPA);
  17.   t := GetSystemTime;
  18.   case method of
  19.     0: SortTPAFrom(TPA, center);
  20.     1: pp_TPASortSpiral(TPA, center);
  21.     2: pp_TPASortRadar(TPA);
  22.   end;
  23.   WriteLn('Sorting took ' + IntToStr(GetSystemTime - t) + ' ms.');
  24. end;
  25.  
  26. begin
  27.   Test;
  28. end.
Advertisement
Add Comment
Please, Sign In to add comment