I'm trying to do a check to be sure a variable IS outside a range.
An IF statement that would check if 'x' is outside the range of 'y' plus or minus 1000.
I think I'm just over thinking this, thoughts?
Variable IS NOT inbetween a given set?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Variable IS NOT inbetween a given set?
if ((x<(y-1000))or (x>(y+1000)))
- NateMac
- Posts: 32
- Joined: Fri Jun 13, 2014 10:52 am
Re: Variable IS NOT inbetween a given set?
Ya know what, I had that and I thought it was wrong for some reason, needed the gym and a fresh eye, thanks for the help.franklin97355 wrote:if ((x<(y-1000))or (x>(y+1000)))
Please be positive and constructive with your questions and comments.