optimized it a bit

This commit is contained in:
zueuk 2005-09-15 16:43:23 +00:00
parent 63991a1bd3
commit 6876a3f80a

View File

@ -24,13 +24,11 @@ uses
///////////////////////////////////////////////////////////////////////////////
procedure TVariationEyefish.CalcFunction;
var
Flength, r: double;
r: double;
begin
Flength := sqrt(FTx^ * FTx^ + FTy^ * FTy^);
r := 2 * Flength / (Flength + 1);
FPx^ := FPx^ + vvar * r * FTx^ / Flength;
FPy^ := FPy^ + vvar * r * FTy^ / Flength;
r := 2 / (sqrt(FTx^ * FTx^ + FTy^ * FTy^) + 1);
FPx^ := FPx^ + vvar * r * FTx^;
FPy^ := FPy^ + vvar * r * FTy^;
end;
///////////////////////////////////////////////////////////////////////////////