User Tag List

Results 1 to 5 of 5

Thread: 300-(300 mod 29)/29 = 300!?

  1. #1
    Clicker Fusion 2.5 MaciOS 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)
    Shadoku's Avatar
    Join Date
    Jul 2006
    Posts
    73
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    300-(300 mod 29)/29 = 300!?

    Am I missing something here? The above expresion should come out to 10, yet MMF seems to think it's 300... Can anyone reproduce this?

    edit: I need to go back to grade school math

  2. #2
    Clicker Multimedia Fusion 2
    dragonguy's Avatar
    Join Date
    Apr 2008
    Location
    RULE BRITANNIA!
    Posts
    3,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 300-(300 mod 29)/29 = 300!?

    Well lets see now.
    300 mod 29 is 10
    10 divide by 29 is 0.34482758620689655172413793103448
    300 minus 29 is 0.34482758620689655172413793103448 is 299.65517241379310344827586206897

    I honsetly don't know how you got to 10.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: 300-(300 mod 29)/29 = 300!?

    Solved.

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: 300-(300 mod 29)/29 = 300!?

    MMF2 computes it in this order:

    300 - (300 mod 29) / 29
    --->
    300 - 10 / 29
    --->
    300 - 0
    --->
    300

    Since 10/29 is less than 1.00, MMF2 will round it down and compute it as 0. To use decimal calculations you can change the code to this:

    300-(300 mod 29)/29.0

    Which will give 299.655172 as the result

  5. #5
    Clicker Fusion 2.5 MaciOS 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)
    Shadoku's Avatar
    Join Date
    Jul 2006
    Posts
    73
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: 300-(300 mod 29)/29 = 300!?

    The problem was I was working it out on paper the same way I came up with it in the first place, so I was doing it like this: (300 - (300 mod 29)/29 but MMF was doing it the way it was supposed to be done.

    Just needed to add that extra pair of brackets and everything works as it should now.

Posting Permissions

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