* patch by Rika: Implement TCurrencyHelper.Ceil/Floor, resolves #40134

This commit is contained in:
florian 2023-01-31 22:58:51 +01:00 committed by Pierre Muller
parent 0e449a5f06
commit 08b612f218

View File

@ -1591,12 +1591,16 @@ end;
function TCurrencyHelper.Ceil: Int64;
begin
{$warning TCurrencyHelper.Ceil unimplemented!}
Result:=System.Trunc(Self);
if Currency(Result)<Self then
Result:=Result+1;
end;
function TCurrencyHelper.Floor: Int64;
begin
{$warning TCurrencyHelper.Floor unimplemented!}
Result:=System.Trunc(Self);
if Currency(Result)>Self then
Result:=Result-1;
end;
function TCurrencyHelper.Frac: Currency;