取整解决方法
取整
请问在DELPHI是中是否有一函数可以取整,比如0.12 则为1
1.68 则为2
------解决方案--------------------
自己写个小函数算一下;if x-trunc(x)> 0 then result := trunc(x) + 1 else result := trunc(x)
请问在DELPHI是中是否有一函数可以取整,比如0.12 则为1
1.68 则为2
------解决方案--------------------
自己写个小函数算一下;if x-trunc(x)> 0 then result := trunc(x) + 1 else result := trunc(x)