![]() |
AW: Rundungsproblem in Delphi
Liste der Anhänge anzeigen (Anzahl: 1)
Ich habe hier noch einen recht alten Code von John Herbster gefunden. Der hat bei mir in der Vergangenheit eigentlich immer gut funktioniert.
|
AW: Rundungsproblem in Delphi
Moin...8-)
Zitat:
|
AW: Rundungsproblem in Delphi
@haentschman
Es geht nach wie vor um Delphi 7 und dort gibt es nur
Delphi-Quellcode:
function SimpleRoundTo(const AValue: Double; const ADigit: TRoundToRange = -2): Double;
Delphi-Quellcode:
function SimpleRoundTo(const AValue: Double; const ADigit: TRoundToRange = -2): Double;
var LFactor: Double; begin LFactor := IntPower(10, ADigit); Result := Trunc((AValue / LFactor) + 0.5) * LFactor; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:35 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz