A very simple little procedure to give you a result using the negation operator when a number is below 0.
Saves the need to search left to right or right to left depending which number is bigger so you can get on with other more important things...
Matt is quite correct. I wrote this little bit to use in a project for creating Master keyed lock systems. 1 of the requirements is a rule to stop physical overrun between pin chambers when 1 cut is very low & the other very high & I am using this little proc to delete any keys that fail this test.
Abs() will do this just as simply. It just wasn't coming to mind when I needed it...... :roll: