【问题标题】:What does the value 1e100f stand for?值 1e100f 代表什么?
【发布时间】:2009-07-21 14:49:30
【问题描述】:

我在 sn-p 中看到过这个:

animation.repeatCount = 1e100f;

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

【问题讨论】:

    标签: iphone cocoa-touch uikit core-animation


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      我认为它在IEEE 754浮点格式中是无限的

      【讨论】:

        【解决方案3】:

        0x1e100f 是十进制的 1970191 - 可能是这样吗?似乎没有足够的整数来深思熟虑。

        编辑

        我只是在 Google 上found the following.. 听起来像你的答案

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

        【讨论】:

          猜你喜欢
          • 2017-03-10
          • 1970-01-01
          • 2011-06-21
          • 2012-08-14
          • 2011-09-11
          • 1970-01-01
          • 1970-01-01
          • 2018-05-24
          • 2019-02-09
          相关资源
          最近更新 更多