所以我有以下代码:
angle = progbm.progress * 30;
NSLog(@"%d,%f", angle, progbm.progress);
progbm 是一个 UIProgressView(从 0.0 运行到 1.0)并且角度很短。
在其他地方,我有将进度条向上或向下更新 0.1 的代码。然后我似乎得到了一些奇怪的结果。这是控制台输出:
2011-05-14 15:21:25.265 AppTest[768:307] 3,0.100000
2011-05-14 15:21:26.238 AppTest[768:307] 6,0.200000
2011-05-14 15:21:27.245 AppTest[ 768:307] 9,0.300000
2011-05-14 15:21:28.061 AppTest[768:307] 12,0.400000
2011-05-14 15:21:28.940 AppTest[768:307] 15,0.500000
2011-05-14 15:21:29.820 AppTest[768:307] 18,0.600000
2011-05-14 15:21:30.716 AppTest[768:307] 21,0.700000
2011-05-14 15:21:31.644 AppTest[768:307] 24 ,0.800000
2011-05-14 15:21:32.860 AppTest[768:307] 27,0.900000
2011-05-14 15:21:34.460 AppTest[768:307] 30,1.000000
2011-05-14 15:21:39.02. AppTest[768:307] 27,0.900000
2011-05-14 15:21:40.173 AppTest[768:307] 23,0.800000
0.800000 * 30 如何等于 23?