1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-25 18:52:15 -05:00

randomrange shit

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@348 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2009-12-26 16:49:02 +00:00
parent 388e50184b
commit 9a7803d3f7
2 changed files with 6 additions and 1 deletions

View File

@ -25,3 +25,8 @@ function psSqr( e : extended) : extended;
begin;
result := sqr(e);
end;
function ps_RandomRange(const aFrom, aTo: Integer): Integer;
begin
Result:=Random(Abs(aFrom-aTo))+Min(aTo,AFrom);
end;

View File

@ -51,7 +51,7 @@ AddFunction(@pssqr,'function Sqr(e : extended) : extended;');
AddFunction(@classes.point,'function Point(x,y:integer) : TPoint;');
AddFunction(@Distance,'function Distance(x1,y1,x2,y2 : integer) : integer;');
AddFunction(@hypot,'function Hypot(X, Y: Extended): Extended;');
AddFunction(@RandomRange,'function RandomRange(aFrom,aTo: Integer): Integer;');
AddFunction(@ps_RandomRange,'function RandomRange(aFrom,aTo: Integer): Integer;');
{window}
SetCurrSection('Window');