User Tag List

Results 1 to 5 of 5

Thread: Problem: comparsion between two numbers with tolerance +/- 2 %

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Problem: comparsion between two numbers with tolerance +/- 2 %

    I have to make a comparison between two numbers, but with a tolerance eg:

    I have a value of 200 in a string

    I must have an active object that, when the x value compared to the value of 200 is the highest 2% or more lower than 2%, the banner is green, otherwise (else) turns red

    the value 200 is a dynamic value read from a hardware device that goes from 0 to 250 (the elettrcia mains voltage)

    inside an edit box I have to put the value that I read with the tester into an electrical socket
    If the tester read 232 volts, I enter this value in the 'edit box.
    if the voltage read from my hardware unit is next to that +/- 2% it means that the system is calibrated ok and a graphic banner changes state.
    You can help me?

  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,512
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    You can check whether abs(B-A) is lower than the tolerance threshold.
    You can potentially see the percentage difference between two numbers using 100.0*((B - A) / A) or something like that but you'll need to multiply each value by 1.0 to make it floating point.
    .:::.Joshtek.:::.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    thanksJoshtek for your help, but I had trouble understanding...

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceiˇ - Brazil
    Posts
    909
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hello daniele,

    I made an example, I don't know if it's what you need. Take a look, please. I think that you can use Immediate If Object for only need a single event.

    Compare.mfa

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    thank you :-)
    I have solved with a more simple system, but it is not very effective.
    Your method is much more functional even higher than those shown.
    Thanks so much

Similar Threads

  1. Problem with text to numbers
    By Outcast in forum Fusion 2.5
    Replies: 5
    Last Post: 9th June 2015, 03:11 PM
  2. [Suggestion] Object Activation Tolerance
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 24th August 2012, 08:25 PM
  3. Screen Ratio Tolerance???
    By Paul_Boland in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th June 2010, 10:51 PM
  4. I have a problem with decimal numbers
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 9th February 2009, 11:35 PM
  5. Counter (NUMBERS) problem
    By Wingamez in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th January 2007, 03:05 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
  •