User Tag List

Results 1 to 4 of 4

Thread: Limiting digits

  1. #1
    Clicker Multimedia Fusion 2 Developer

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

    Limiting digits

    Hi.

    Is there any easy way to limit the number of digits in an alterable value?

    Thanks.

  2. #2
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Limiting digits

    You could always set the value to: Value mod 1000, with the same number of 0's as you want digits.
    Or use a counter, but that's not always an option.

  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: Limiting digits

    Quote Originally Posted by Werbad
    You could always set the value to: Value mod 1000, with the same number of 0's as you want digits.
    I don't see how that would work at all. All I can imagine it would do is reset my value when it reaches 1000.

    Anyways I found another way:

    floor(value * (10 pow digits)) / (10 pow digits)


    a tad complicated, but works like a charm!

    Anyways thanks for your quick reply, Werbad!

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Limiting digits

    I was a little tired, sorry. The one I was thinking of was Max(Min(Value, <Upper Limit>), <Lower Limit>)

Similar Threads

  1. Limiting an Angle
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st May 2013, 09:37 AM
  2. > 16 significant digits?
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 14th July 2012, 04:43 AM
  3. Arrays and Double Digits
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 5th October 2008, 02:02 PM
  4. Force 2 Digits
    By sns2015 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th September 2008, 10:28 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
  •