Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$loadlib pumbaa.dll}
- const
- METHOD = 0; // 0 = SortTPAFrom
- // 1 = SortSpiral
- // 2 = SortRadar
- procedure Test;
- var
- center: TPoint;
- t: Integer;
- TPA: TPointArray;
- begin
- ClearDebug;
- TPA := TPAFromBox(IntToBox(10, 10, 990, 990));
- if (method <> 2) then
- center := pp_TPACenter(TPA);
- t := GetSystemTime;
- case method of
- 0: SortTPAFrom(TPA, center);
- 1: pp_TPASortSpiral(TPA, center);
- 2: pp_TPASortRadar(TPA);
- end;
- WriteLn('Sorting took ' + IntToStr(GetSystemTime - t) + ' ms.');
- end;
- begin
- Test;
- end.
Advertisement
Add Comment
Please, Sign In to add comment