User Tag List

Results 1 to 3 of 3

Thread: This one is a toughy...

  1. #1
    No Products Registered

    Join Date
    Apr 2008
    Location
    Weston-super-mare
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    This one is a toughy...

    How do i check if a value is NOT a multiple of 32?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: This one is a toughy...

    You can run a loop x/32 number of times.
    On each loop, set a counter to (loopindex("loop")+1) * 32
    After the loop is ran, check if the value of the counter equals x. If it is, then it is a multiple of 32. If not, it isn't

    For instance, the value is 100.
    The loop is ran 100/32 = 3 times

    1 * 32 = 32
    2 * 32 = 64
    3 * 32 = 96

    96 is not 100, so 100 is not a multiple of 32.

    If the value is 64
    The loop is ran 64/32 = 2 times

    1 * 32 = 32
    2 * 32 = 64

    64 = 64, so 64 is a multiple of 32.

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: This one is a toughy...

    If x mod 32 > 0 then not a multiple

Posting Permissions

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