optimized it a bit
This commit is contained in:
parent
63991a1bd3
commit
6876a3f80a
@ -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;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user