User Tag List

Results 1 to 5 of 5

Thread: Rounding up/down

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rounding up/down

    Is there a way to round a value up/down instead of automatically rounding down using floor()?

  2. #2
    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: Rounding up/down

    floor() rounds down to the floor.
    ceil() rounds up to the ceiling.

    If you wanted to be different then you could use (-1.0*floor(-1.0*value)), but that is a silly way of rounding up.
    .:::.Joshtek.:::.

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Rounding up/down

    Yeah but is there a way to automatically make it figure out if it should round up or down?

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Rounding up/down

    round()

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Rounding up/down

    Awesome, thanks.

Similar Threads

  1. Rounding issues
    By Arnax in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 24th February 2012, 08:17 AM
  2. Rounding Down Counters
    By etrose in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th November 2011, 09:41 PM
  3. Rounding Down
    By etrose in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th November 2011, 11:32 AM
  4. Rounding issue
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 4th July 2011, 09:54 PM
  5. Rounding numbers
    By The_Alee in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th September 2006, 09:48 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
  •