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);
The following information is from the network:
Round: If the parameter is a decimal, then the rounding of itself is asked.
Ceil: If the parameter is a decimal, the smallest integer is not less than itself.
Floor: If the parameter is a decimal, the largest integer is evaluated but not greater than itself.
Example: How the value is 3.4, then
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)
where Floorf (self.view.bounds.size.width*0.5f-39.f*0.5f) returns a value of
140.000000 this form
The Round/ceil/floorf function in iOS is slightly solved