ios中round/ceil/floorf函数的使用
来源:互联网 发布:java file类的功能 编辑:程序博客网 时间:2024/05/03 18:02
extern float ceilf(float);
extern double ceil(double);
extern longdouble ceill(longdouble);
extern float floorf(float);
extern double floor(double);
extern longdouble floorl(longdouble);
extern float roundf(float);
extern double round(double);
extern longdouble roundl(longdouble);
round:如果参数是小数,则求本身的四舍五入。
ceil:如果参数是小数,则求最小的整数但不小于本身.
floor:如果参数是小数,则求最大的整数但不大于本身.
Example:如何值是3.4的话,则
3.4 -- round 3.000000
-- ceil 4.000000
-- floor 3.00000
CGRectMake(floorf(self.view.bounds.size.width*0.5f - 39.f*0.5f),self.view.bounds.size.height -57, 39, 39)
其中floorf(self.view.bounds.size.width*0.5f -39.f*0.5f)返回值为
140.000000这种形式
0 0
- ios中round/ceil/floorf函数的使用
- iOS开发中,round/ceil/floorf函数的理解
- iOS-round、ceil、floorf函数
- iOS中的round/ceil/floorf函数
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- iOS中的round/ceil/floorf函数略解
- Math中的round/ceil/floorf方法总结
- Math中的round/ceil/floorf方法总结
- Oracle中trunc函数、round 函数、ceil函数和floor函数的使用
- Oracle中trunc函数、round 函数、ceil函数和floor函数的使用
- Oracle中trunc函数、round 函数、ceil函数和floor函数的使用
- 一个常见的错误..
- SpringMVC+Spring+hibernate整合
- Redis Cluster教程
- 一次性搞定正则表达式
- 谷歌AdMob广告接入(插屏广告)
- ios中round/ceil/floorf函数的使用
- windows 下 编译cocs2d-x 3.0
- Paint---Shader
- Java Web整合开发(王者归来)书本源码(光盘上所有内容)
- 封装一个count函数,能实现如此调用:count(a)(b)(c)(d)(e)
- 欢迎您在新浪博客安家
- 140,Swift的字符串
- hibernate.hbm2ddl.auto 各个取值…
- spring注解学习之一