1e100f的价值是什么?

时间:2009-07-21 14:49:30

标签: iphone cocoa-touch uikit core-animation

我在片段中看到了这一点:

animation.repeatCount = 1e100f;

我的数学课很久以前。那么1e100f将是一个有100个零的数字?那么在这种情况下,程序员想拥有无限的repeatCount?

3 个答案:

答案 0 :(得分:13)

根据this page on Timing, Timespaces, and CAAnimation,将repeatCount设置为1e100f将导致动画重复,直到从图层中删除。“

答案 1 :(得分:2)

我认为它是IEEE 754浮点格式的无穷大

答案 2 :(得分:0)

0x1e100f是十进制1970191 - 可能是那个吗?看起来似乎不是一个足够圆的数字。

修改

我只是found the following在谷歌上......听起来像你的回答

animation.repeatCount = 1e100f; // this is infinity in IEEE 754 floating point format
相关问题