User Tag List

Results 1 to 4 of 4

Thread: Why does MMF not subtract/add to zero? (read post)

  1. #1
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why does MMF not subtract/add to zero? (read post)

    Hi,

    I made a very simple program in MMF which is causing me the most of problems, my goal is simply do this: I want an object to rotate using decimal values, I want each rotation to be say 0.01 pixels I know this seems impossible, but I thought sub-pixel movement was feasible? I used ALT VAL*0.01 and it adds and subtracts fine, but the problem is when it gets to zero the angle is some strange number (try this using an object add a decimal alt. val to it and then subtract that same value and the angle never seems to become zero). I can post an example if need be. Also please try to make the increment low, preferably 0.01 or lower.

    -Thanks, Variant

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Why does MMF not subtract/add to zero? (read post)

    http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

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

    Re: Why does MMF not subtract/add to zero? (read post)

    You could use an alterable value to hold the angle * 100, and then set the real angle to the alterable value / 100.0 when you change it. That way you're never reading a floating point number.

    Obviously you'd add 1 instead of 0.01 in this case.

  4. #4
    No Products Registered

    Join Date
    Oct 2009
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Why does MMF not subtract/add to zero? (read post)

    I just figured that out before you posted it!!! But yes, that appears to work wonderfully! It is a little strange though why the other way didn't work... Thanks for the help anyway though! It is greatly appreciated!

    -Thanks, Variant

Similar Threads

  1. Add/Subtract Effects
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 20th February 2012, 03:20 PM
  2. Subtract effect
    By Felik in forum Hardware Accelerated Runtime
    Replies: 2
    Last Post: 24th October 2011, 01:58 PM
  3. Overlay Add/Subtract Inks?
    By LazyCoder in forum Extension Development
    Replies: 1
    Last Post: 21st November 2007, 10:18 PM
  4. Overlay add/subtract?
    By UltimateWalrus in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 18th July 2006, 03:16 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
  •