SRL Archive - Bugs

Simba minimum/maxmimum function


Cstrike

2010-08-28 08:55:36

I didn't know if you were talking to Nava or myself here:
http://villavu.com/forum/showthread.php?t=58625
Was this the bug report you were looking for? Hopefully I'm not doing it wrong :/ , if I did I'll delete the thread.


You said that you would want quicksort due to it's quickness for the machine itself rather than code, so based on I luff yeww's script

function AMin(Numbers: TIntegerArray): Integer;
var
arr: TIntegerArray;
begin
SetArrayLength(arr, Length(Numbers));
arr := Numbers;
QuickSort(arr);
Result := arr[0];
end;

function AMax(Numbers: TIntegerArray): Integer;
var
arr: TIntegerArray;
begin
SetArrayLength(arr, Length(Numbers));
arr := Numbers;
QuickSort(arr);
Result := arr[Length(arr) - 1];
end;

If I did something wrong or missed anything I shall fix them appropriately :)

EvilChicken!

2010-08-28 09:02:41

I think Wizzup? meant that you should file a bug report here.

Hm, he should clarify this, you're not the first one to have this mistaken.

Nava2

2010-08-28 10:09:10

http://villavu.com/forum/showthread.php?t=56531