加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Delphi取整函数

发布时间:2020-12-15 10:02:34 所属栏目:大数据 来源:网络整理
导读:floor 和 ceil 是 math unit 里的函数,使用前要先 Uses Math。 trunc 和 round 是 system unit 里的函数,缺省就可以用。 floor 直接往小的取,比如 floor(-123.55)=-124,floor(123.55)=123 trunc 直接切下整数,比如 trunc(-123.55)=-123,floor(123.55)=1


floor 和 ceil 是 math unit 里的函数,使用前要先 Uses Math。
trunc 和 round 是 system unit 里的函数,缺省就可以用。
floor 直接往小的取,比如 floor(-123.55)=-124,floor(123.55)=123
trunc 直接切下整数,比如 trunc(-123.55)=-123,floor(123.55)=123
ceil 直接往大的取,比如 ceil(-123.55)=-123, ceil(123.55)=124
round 计算四舍五入,比如 round(-123.55)=-124,round(123.55)=124

ABS取绝对值

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读