User Tag List

Results 1 to 5 of 5

Thread: How can I test / compare signs i.e., is integer + or -

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleFirefly 3D ModuleInstall Creator Pro
    twister's Avatar
    Join Date
    Jan 2007
    Location
    Pacific Northwest USA
    Posts
    376
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Question How can I test / compare signs i.e., is integer + or -

    I'm messing around with DOS qbasic. With DOS there is a function SGN which will return any +1 for a positive value, 0 for zero, and -1 for any negative value. Does MMF2 Dev have a single function of this? thx

  2. #2
    Clicker Fusion 2.5 Developer

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

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleFirefly 3D ModuleInstall Creator Pro
    twister's Avatar
    Join Date
    Jan 2007
    Location
    Pacific Northwest USA
    Posts
    376
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    No, but thx, The abs converts a neg to a pos. I need to know if the number is negative, a -12 would set a counter to a -1, a positive 12 would set a counter to a +1. I can compare a number with "greater, lower or equal, which requires three actions. I'm looking for a single function instead.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    You didn't read it properly.
    -12 / abs( -12 ) = -12 / 12 = -1
    +12 / abs( +12 ) = 12 / 12 = +1
    0 / abs( 0 ) = 0 / 0 = 0

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleFirefly 3D ModuleInstall Creator Pro
    twister's Avatar
    Join Date
    Jan 2007
    Location
    Pacific Northwest USA
    Posts
    376
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    thx muddy mole - I did miss it

Similar Threads

  1. 'Compare to one of the alterable values' VS 'Compare two general values'
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st January 2012, 06:26 PM
  2. why always integer value when you set global val.?
    By EasySite in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th July 2010, 03:26 PM
  3. Integer to String in C++
    By Dines in forum Extension Development
    Replies: 6
    Last Post: 20th May 2010, 08:40 AM
  4. Non-integer scaling
    By BenMo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd January 2007, 10:54 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
  •