User Tag List

Results 1 to 4 of 4

Thread: how to round to nearest 25

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    rubes's Avatar
    Join Date
    May 2011
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to round to nearest 25

    I suspect MOD might be involved but what would the formula look like to take an integer and convert it to the nearest multiple of 25? 9 becomes 0, 31 becomes 25, 49 becomes 50 etc

  2. #2
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,739
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)
    x MOD 25 will give you the remainder of the division of x / 25.

    If you do: floor(x / 25) * 25 that should get you to the figure you're after.

    Alternatively: x - (x MOD 25)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Ryan's Avatar
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    1,279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Based on the expected results posted, the formula needs to be:
    round(x / 25) * 25

    otherwise 49 will become 25, not 50 as requested.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    rubes's Avatar
    Join Date
    May 2011
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you kindly

Similar Threads

  1. Round / Circle Countdown Timer
    By aenever in forum Fusion 2.5
    Replies: 10
    Last Post: 7th July 2014, 03:46 AM
  2. Round function ...how to?
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th April 2011, 11:22 AM
  3. How does MMF2 round floats?
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th August 2009, 07:11 PM
  4. creating a round meter fill up
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 1st February 2008, 01:46 AM
  5. Round Value - Question
    By Jellyhead365 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 5th January 2008, 05:19 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
  •