|
@@ -418,6 +418,7 @@ function maxvalue(const data : PInteger; Const N : Integer) : Integer;
|
|
{ returns random values with gaussian distribution }
|
|
{ returns random values with gaussian distribution }
|
|
function randg(mean,stddev : float) : float;
|
|
function randg(mean,stddev : float) : float;
|
|
function RandomRange(const aFrom, aTo: Integer): Integer;
|
|
function RandomRange(const aFrom, aTo: Integer): Integer;
|
|
|
|
+function RandomRange(const aFrom, aTo: Int64): Int64;
|
|
|
|
|
|
{$ifdef FPC_HAS_TYPE_SINGLE}
|
|
{$ifdef FPC_HAS_TYPE_SINGLE}
|
|
{ calculates the standard deviation }
|
|
{ calculates the standard deviation }
|
|
@@ -1231,6 +1232,12 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+function RandomRange(const aFrom, aTo: Int64): Int64;
|
|
|
|
+begin
|
|
|
|
+ Result:=Random(Abs(aFrom-aTo))+Min(aTo,AFrom);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+
|
|
{$ifdef FPC_HAS_TYPE_SINGLE}
|
|
{$ifdef FPC_HAS_TYPE_SINGLE}
|
|
function stddev(const data : array of Single) : float;
|
|
function stddev(const data : array of Single) : float;
|
|
|
|
|