User Tag List

Results 1 to 6 of 6

Thread: [solved] Division is returning a rounded number

  1. #1
    No Products Registered

    Join Date
    Mar 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [solved] Division is returning a rounded number

    I noticed that in MMF 1.5 and in the demo of MMF 2.0 that when I try to divide, I always get a rounded number.

    Example : The input is 5/2, the output is 2.
    The input is 52/10, the output is 5.

    Why does it do this, I tried outputing this in a string and counter. Same result.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Division is returning a rounded number

    For some reason, MMF likes decimals since the start.
    Divide 5/2.0 or 52 / 10.0 and you'll get a decimal result.

  3. #3
    No Products Registered

    Join Date
    Mar 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Division is returning a rounded number

    What if I wanted to divide the value of two edit boxes. How would I changed this :
    (Edit Value( "Crag's Edit Object" ) / Edit Value( "Crag's Edit Object 2" ))

    and make it work properly

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Division is returning a rounded number

    Multiply them by 1.0
    .:::.Joshtek.:::.

  5. #5
    No Products Registered

    Join Date
    Mar 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Division is returning a rounded number

    Thanks alot, it works great

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Division is returning a rounded number

    Have a hidden Edit Box and do the following:

    Divide Button is clicked
    >Set HiddenEditBox to text of EditBox1 + ".0"
    >Set counter to value of HiddenEditBox / value of EditBox2

    That should work.
    KnightTrek Productions
    http://www.knighttrek.com

Similar Threads

  1. Division Giving Only 0
    By Kracker in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st May 2013, 09:43 AM
  2. Returning number of objects under a specific condition
    By Ibis in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th November 2012, 01:23 AM
  3. how to make sure a result is always rounded UP
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 31st August 2011, 06:19 PM
  4. Background/Active System Box - Rounded Borders?
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th February 2010, 07:35 PM
  5. Binary Object: Byte returning negative number
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 19th April 2008, 10:46 AM

Posting Permissions

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