What’s the simplest way in actionscript to find if number is between -20 and +20, and return a true/false? I can see there’s a number validator but I see it involves firing and catching events, which I think maybe overkill for the simple test I’m trying to do here.
Share
Simplest way would be comparing the number with both values and logical combine the results:
You may use
>=or<=to include the values if needed.You can make that into a nice function: