Convert float to int in Objective-C

后端 未结 4 518
半阙折子戏
半阙折子戏 2021-02-02 02:18

How can I convert a float to int while rounding up to the next integer? For example, 1.00001 would go to 2 and 1.9999 would go to 2.

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