playMaker

Author Topic: Test for NaN  (Read 618 times)

catfriedrice

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Test for NaN
« on: February 12, 2015, 09:53:24 PM »
May have to code this, but would rather not.  Is there a method with Playmaker to test a float variable as NaN?  I have a formula I'm using to determine the AI's choices made, and sometimes those choices end up getting divided by 0.  I could live with NaN if it didn't pollute other variables when needing to add/subtract/etc, so to fix I want to set it to 0 or 1.  I attempted setting a global variable to NaN and comparing mine to that global variable, that fails.  I attempted searching for anything related to NaN, Not A Number, Null, etc. via google, Playmaker Forums, etc to no avail.   

If there is no method, that's fine.  I have a GameObject Is Null workaround but I'd rather not use it as it adds another 10-20 states.