mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 23:35:57 +02:00
TAChart: Improved implementation of IsEquivalent. Issue #35537, patch by Marcin Wiazowski.
git-svn-id: trunk@61188 -
This commit is contained in:
parent
be344c2282
commit
cf39c4e02a
@ -495,9 +495,18 @@ begin
|
||||
end;
|
||||
|
||||
function IsEquivalent(const A1, A2: Double): Boolean;
|
||||
{$IF SizeOf(Double) = SizeOf(QWord)}
|
||||
var
|
||||
Q1 : QWord absolute A1;
|
||||
Q2 : QWord absolute A2;
|
||||
begin
|
||||
Result := CompareDWord(A1, A2, SizeOf(A1) div SizeOf(DWord)) = 0;
|
||||
Result := Q1 = Q2;
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
Result := CompareByte(A1, A2, SizeOf(A1)) = 0;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function IsNan(const APoint: TDoublePoint): Boolean;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user