标签:
extern float ceilf(float);
extern double ceil(double);
extern long double ceill(long double);
extern float floorf(float);
extern double floor(double);
extern long double floorl(longdouble);
extern float roundf(float);
extern double round(double);
extern long double roundl(longdouble);
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这种形式
标签:
原文地址:http://www.cnblogs.com/xdios/p/4775807.html