Round a float up to the next integer in objective C?

前端 未结 4 1876
青春惊慌失措
青春惊慌失措 2020-12-23 16:01

How can I round a float up to the next integer value in objective C?

1.1 -> 2
2.3 -> 3
3.4 -> 4
3.5 -> 4
3.6 -> 4
1.0000000001 -> 2
         


        
4条回答
提交回复
热议问题