mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -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:
parent
388e50184b
commit
9a7803d3f7
@ -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;
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user