User Tag List

Results 1 to 3 of 3

Thread: [Bug] Float values are slightly off

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    [Bug] Float values are slightly off

    Issue:
    Most float values are not accurate, seemingly no matter where or how it is used.
    Some values, like 1.0 and 0.5 seems to be ok, though.

    How to produce:
    Place a counter, and at start of frame, set it to 0.9. It will show 0.8999999761581421, which is slightly below what it should be.
    If I instead set it to 0.91, it shows 0.9100000262260437, which is slightly above what it should have been...


    The value is very little off, but my game's scrolling doesn't work at all at the moment, and I suspect this bug to be the direct cause of that.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    This is due to approximations in the Flash floating point libraries. And there is nothing I can do about it. The same problem exists also in C++ and all the runtimes.
    When you want to test a floating point number for a value (example 1), you have to do :
    Value > 0.99
    Value < 1.1

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Hm I see, but my game works as it should on windows, android and ios. I guess this issue isn't the reason my scrolling doesn't work on Flash then.

Similar Threads

  1. Float ignored in Global Values settings
    By Greg in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 3rd February 2010, 06:51 PM
  2. Slightly curved text?
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th September 2009, 07:17 AM
  3. Slightly Confused
    By lembi2001 in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 21st June 2008, 01:44 AM
  4. Slightly buggy engine
    By Matt_Gardner in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 17th August 2006, 01:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •