Autor Beitrag
christian87
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: So 18.02.07 19:53 
Hi

ich habe einen real Wert, den ich gerundet habe. Um ein Rechteck zu zeichnen brauche ich allerdings nen Integer Wert. Gibt es irgendeine Möglichkeit? floattoint klappt ja leider nicht.
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 18.02.07 20:00 
FloatToStr, StrToInt

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 18.02.07 20:00 
Du könntest mit Trunc() die Nachkommastellen abschneiden - dann sollte es gehen.
Oder du rundest auf 0 Nachkommastellen. ;)
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: So 18.02.07 21:29 
Na funktioniert da nicht die "tolle" funktion Round() ?????
Damit geht das doch beinahe 110% !

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 18.02.07 21:43 
user profile iconBlackheart666 hat folgendes geschrieben:
FloatToStr, StrToInt

Nur über Umwege mit Copy und Co. :roll:

Nimm Trunc(); oder Round();

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: So 18.02.07 21:55 
Also wenn die Werte schon gerundet sind wandelst du sie mit Round() nur in Integer um!!!

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse