You've already forked lazarus-ccr
LazStats: Use TAChart in PlotXYUnit (old code still available after undefining USE_TACHART):
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7626 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -2,3 +2,5 @@
|
|||||||
{$DEFINE USE_EXTERNAL_HELP_VIEWER}
|
{$DEFINE USE_EXTERNAL_HELP_VIEWER}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$DEFINE USE_TACHART}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,8 @@ unit Utils;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, StdCtrls, Dialogs;
|
Classes, SysUtils, StdCtrls, Dialogs,
|
||||||
|
Globals;
|
||||||
|
|
||||||
function AnySelected(AListbox: TListBox): Boolean;
|
function AnySelected(AListbox: TListBox): Boolean;
|
||||||
|
|
||||||
@@ -16,6 +17,8 @@ procedure Exchange(var a, b: Double); overload;
|
|||||||
procedure Exchange(var a, b: Integer); overload;
|
procedure Exchange(var a, b: Integer); overload;
|
||||||
procedure Exchange(var a, b: String); overload;
|
procedure Exchange(var a, b: String); overload;
|
||||||
|
|
||||||
|
procedure SortOnX(X, Y: DblDyneVec);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
function AnySelected(AListBox: TListBox): Boolean;
|
function AnySelected(AListBox: TListBox): Boolean;
|
||||||
@@ -68,5 +71,26 @@ begin
|
|||||||
b := tmp;
|
b := tmp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure SortOnX(X, Y: DblDyneVec);
|
||||||
|
var
|
||||||
|
i, j, N: Integer;
|
||||||
|
begin
|
||||||
|
N := Length(X);
|
||||||
|
if N <> Length(Y) then
|
||||||
|
raise Exception.Create('[SortOnX] Both arrays must have the same length');
|
||||||
|
|
||||||
|
for i := 0 to N - 2 do
|
||||||
|
begin
|
||||||
|
for j := i + 1 to N - 1 do
|
||||||
|
begin
|
||||||
|
if X[i] > X[j] then //swap
|
||||||
|
begin
|
||||||
|
Exchange(X[i], X[j]);
|
||||||
|
Exchange(Y[i], Y[j]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user