How to convert double to int in objective c?

前端 未结 0 989
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 19:39

I run this code on Simulator.

double d = 1609412671980.7009;
int i = d;
NSLog(@"print i: %d", i); //          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题