Re: Rounding a float down
Posted by webmaster Guido on October 30, 2003 at 18:07:57:
In Reply to: Rounding a float down posted by Joey on October 26, 2003 at 16:20:34:
: I have a problem where i have number say 1.5 and when i use the formatfloat('0',score) function it gives me 2! but i need 1 how do i do this? ty for any help in advance
Use the Trunc function. Trunc(X) returns an integer value that is the value of X rounded toward zero.
[ DelphiLand: free Delphi source code, tips, tutorials ]