From 789c0ae5966f585d4dabab0a0b09eb8f2fe5607e Mon Sep 17 00:00:00 2001 From: zueuk Date: Sun, 19 Mar 2006 17:59:20 +0000 Subject: [PATCH] some small fixes --- 2.10/Source/varJuliaN.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/2.10/Source/varJuliaN.pas b/2.10/Source/varJuliaN.pas index 57d869f..6b5d416 100644 --- a/2.10/Source/varJuliaN.pas +++ b/2.10/Source/varJuliaN.pas @@ -17,6 +17,7 @@ type N: integer; c: double; + rN: integer; cn: double; procedure CalcPower1; @@ -57,6 +58,7 @@ end; procedure TVariationJulian.Prepare; begin + rN := abs(N); cn := c / N / 2; end; @@ -77,7 +79,7 @@ var r: double; sina, cosa: extended; 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); FPx^ := FPx^ + r * cosa; @@ -93,7 +95,7 @@ asm fld st(1) fpatan mov ecx, eax - mov eax, dword ptr [eax + N] + mov eax, dword ptr [eax + rN] call System.@RandInt push eax fild dword ptr [esp]