mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-16 09:59:04 +02:00
* MaxIntValue implementation from Roman Kassebaum, fixes issue #39248
This commit is contained in:
parent
6d814279ae
commit
b056e9c2b3
@ -142,6 +142,8 @@ function PopNStdDev(const data : array of Double) : double;
|
||||
function PopNVariance(const data : array of Double) : double;
|
||||
procedure MomentSkewKurtosis(const data : array of Double; out m1,m2,m3,m4,skew,kurtosis : double);
|
||||
|
||||
function MaxIntValue(const AData: array of Integer): Integer;
|
||||
|
||||
// Financial functions
|
||||
|
||||
Type
|
||||
@ -883,5 +885,17 @@ begin
|
||||
result:=LessThanValue;
|
||||
end;
|
||||
|
||||
function MaxIntValue(const AData: array of Integer): Integer;
|
||||
var
|
||||
lCount: Integer;
|
||||
begin
|
||||
Result := AData[Low(AData)];
|
||||
for lCount := Low(AData) + 1 to High(AData) do
|
||||
begin
|
||||
if Result < AData[lCount] then
|
||||
Result := AData[lCount];
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user