Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
8. Jan 2014
I don't know :P
So, both Trunc() and Int() remove from input fraction, but both returns different type. I don't know why (if result is integer) and this is reason I'm asking about differences.
BTW: forgot about Round(), that's was mistake :-D
Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
5. Jan 2014
I know Int() :) IF we are here, could you explain me differences between Round(), Trunc() and Int()?
Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
5. Jan 2014
Thanks you, now I understand how it working :)
BTW: if input is Extended and want to truncate to 0 digits (like Round), output should be what type? Cardinal?
Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
5. Jan 2014
How to truncate float number to n digits after point, but without rounding it, for example 147.258 --> 147.25 (input is extended) :wall: