You've already forked lazarus-ccr
fpspreadsheet: Fix 32-bit overflow in fpsutils.Round().
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7174 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -153,7 +153,7 @@ function TryStrToFloatAuto(AText: String; out ANumber: Double;
|
|||||||
function TryFractionStrToFloat(AText: String; out ANumber: Double;
|
function TryFractionStrToFloat(AText: String; out ANumber: Double;
|
||||||
out AIsMixed: Boolean; out AMaxDigits: Integer): Boolean;
|
out AIsMixed: Boolean; out AMaxDigits: Integer): Boolean;
|
||||||
|
|
||||||
function Round(AValue: Double): Integer;
|
function Round(AValue: Double): Int64;
|
||||||
|
|
||||||
function cmToPts(AValue: Double): Double; inline;
|
function cmToPts(AValue: Double): Double; inline;
|
||||||
function EMUToIn(AValue: Int64): Double; inline;
|
function EMUToIn(AValue: Int64): Double; inline;
|
||||||
@@ -1854,7 +1854,7 @@ end;
|
|||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Special rounding function which avoids banker's rounding
|
Special rounding function which avoids banker's rounding
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
function Round(AValue: Double): Integer;
|
function Round(AValue: Double): Int64;
|
||||||
begin
|
begin
|
||||||
if AValue > 0 then
|
if AValue > 0 then
|
||||||
Result := trunc(AValue + 0.5)
|
Result := trunc(AValue + 0.5)
|
||||||
|
Reference in New Issue
Block a user