I'm having a great deal of success coding up various things, but having no formal programming training I'm wondering if there is a better way to approach how I do certain coding related to checking conditions where some number of conditions must be met out of some total number of conditions.
For instance:
(BODY[1] < BODY[2] && BODY[1] < BODY[3]) || (BODY[1] < BODY[2] && BODY[1] < BODY[4]) || (BODY[1] < BODY[3] && BODY[1] < BODY[4])
While this code works, it lacks any sophistication. Is there a more concise way to approach these sort of problems? Or is this the best way to do it? This particular case wasn't too bad, but if I was dealing with more bars and/or possible combinations I could quickly end up with a huge amount of code.
Thanks in advance for any suggestions/advice.
Comment