mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 18:20:00 +02:00
TAChart: Move ExpandRange procedure to TAMath unit
git-svn-id: trunk@32699 -
This commit is contained in:
parent
f69330e51e
commit
9c33a8ec42
@ -265,8 +265,6 @@ procedure Exchange(var A, B: Double); overload; inline;
|
||||
procedure Exchange(var A, B: TDoublePoint); overload; inline;
|
||||
procedure Exchange(var A, B: String); overload; inline;
|
||||
|
||||
procedure ExpandRange(var ALo, AHi: Double; ACoeff: Double); inline;
|
||||
|
||||
function FormatIfNotEmpty(AFormat, AStr: String): String; inline;
|
||||
|
||||
function InterpolateRGB(AColor1, AColor2: Integer; ACoeff: Double): Integer;
|
||||
@ -359,15 +357,6 @@ begin
|
||||
B := t;
|
||||
end;
|
||||
|
||||
procedure ExpandRange(var ALo, AHi: Double; ACoeff: Double);
|
||||
var
|
||||
d: Double;
|
||||
begin
|
||||
d := AHi - ALo;
|
||||
ALo -= d * ACoeff;
|
||||
AHi += d * ACoeff;
|
||||
end;
|
||||
|
||||
function FormatIfNotEmpty(AFormat, AStr: String): String;
|
||||
begin
|
||||
if AStr = '' then
|
||||
|
@ -29,6 +29,8 @@ function InvCumulNormDistr(AX: Double): Double;
|
||||
procedure EnsureOrder(var A, B: Integer); overload; inline;
|
||||
procedure EnsureOrder(var A, B: Double); overload; inline;
|
||||
|
||||
procedure ExpandRange(var ALo, AHi: Double; ACoeff: Double);
|
||||
|
||||
function SafeInfinity: Double; inline;
|
||||
function SafeInRange(AValue, ABound1, ABound2: Double): Boolean;
|
||||
function SafeMin(A, B: Double): Double;
|
||||
@ -131,6 +133,15 @@ begin
|
||||
Exchange(A, B);
|
||||
end;
|
||||
|
||||
procedure ExpandRange(var ALo, AHi: Double; ACoeff: Double);
|
||||
var
|
||||
d: Double;
|
||||
begin
|
||||
d := AHi - ALo;
|
||||
ALo -= d * ACoeff;
|
||||
AHi += d * ACoeff;
|
||||
end;
|
||||
|
||||
function SafeInfinity: Double;
|
||||
begin
|
||||
{$PUSH}{$R-}{$Q-}
|
||||
|
@ -151,7 +151,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Math, SysUtils, TAGeometry, TAGraph;
|
||||
Math, SysUtils, TAGeometry, TAGraph, TAMath;
|
||||
|
||||
type
|
||||
|
||||
|
@ -320,7 +320,7 @@ implementation
|
||||
|
||||
uses
|
||||
GraphMath, LResources, Math, PropEdits, SysUtils,
|
||||
TADrawerCanvas, TAGeometry, TAGraph;
|
||||
TADrawerCanvas, TAGeometry, TAGraph, TAMath;
|
||||
|
||||
{ TLineSeries }
|
||||
|
||||
|
@ -469,7 +469,7 @@ implementation
|
||||
|
||||
uses
|
||||
Forms, GraphMath, InterfaceBase, Math, SysUtils,
|
||||
TACustomSeries, TADrawerCanvas, TAEnumerators, TAGeometry;
|
||||
TACustomSeries, TADrawerCanvas, TAEnumerators, TAGeometry, TAMath;
|
||||
|
||||
function InitBuitlinTools(AChart: TChart): TBasicChartToolset;
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user