Autor Beitrag
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: So 27.02.05 16:14 
Moin....

Wie kann ich einen Realwert in einen Intergerwert konvertieren... Dabei soll er am besten runden...

Also: 5,5 (bzw. 5.5 ;) ) zu 6 oder 1,2462154 zu 1...

Danke...


Moderiert von user profile iconraziel: Topic aus Algorithmen, Optimierung und Assembler verschoben am So 27.02.2005 um 15:16

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 27.02.05 16:18 
Siehe Suche in: Delphi-Forum, Delphi-Library ROUND ;)

_________________
JSXGraph
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: So 27.02.05 16:21 
THX... :autsch: ;)

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 27.02.05 16:23 
Oder zum Abrunden Suche in: Delphi-Forum, Delphi-Library TRUNC ;)

AXMD
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 18:57 
Gibs auch en Befehl nur zum aufrunden? round rundet der doch auf und ab oder net
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: So 27.02.05 19:05 
Ceil in unit math. (Ceil verwendet aber schlussendlich auch trunc und zählt 1 dazu, wenn nötig)
Trunc ist nicht wirklich abrunden, sondern Kommastellen streichen. Zum Abrunden wäre die Funktion Floor zuständig. Bei negativen Zahlen sind die beiden Funktionen nicht gleich.


Zuletzt bearbeitet von delfiphan am So 27.02.05 19:08, insgesamt 1-mal bearbeitet
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 27.02.05 19:07 
Ceil? Wie Geil :lol: Oo

Glaub die könnte ich für Shopsoftware verwenden ;)