some small fixes

This commit is contained in:
zueuk 2006-03-19 17:59:20 +00:00
parent 892a380d0a
commit 789c0ae596

View File

@ -17,6 +17,7 @@ type
N: integer; N: integer;
c: double; c: double;
rN: integer;
cn: double; cn: double;
procedure CalcPower1; procedure CalcPower1;
@ -57,6 +58,7 @@ end;
procedure TVariationJulian.Prepare; procedure TVariationJulian.Prepare;
begin begin
rN := abs(N);
cn := c / N / 2; cn := c / N / 2;
end; end;
@ -77,7 +79,7 @@ var
r: double; r: double;
sina, cosa: extended; sina, cosa: extended;
begin begin
sincos((arctan2(FTy^, FTx^) + 2*pi*random(n)) / N, sina, cosa); sincos((arctan2(FTy^, FTx^) + 2*pi*random(rn)) / N, sina, cosa);
r := vvar * Math.Power(sqr(FTx^) + sqr(FTy^), cn); r := vvar * Math.Power(sqr(FTx^) + sqr(FTy^), cn);
FPx^ := FPx^ + r * cosa; FPx^ := FPx^ + r * cosa;
@ -93,7 +95,7 @@ asm
fld st(1) fld st(1)
fpatan fpatan
mov ecx, eax mov ecx, eax
mov eax, dword ptr [eax + N] mov eax, dword ptr [eax + rN]
call System.@RandInt call System.@RandInt
push eax push eax
fild dword ptr [esp] fild dword ptr [esp]