Finding the closest number - How to make it show the two options when just in the middle of two numbers?
Mario Fernando Cardoso
Jan 21 2022 | 3:46 am
These are very good ways to find the closest number to certain number.
However, when the input number (the one you want to go to its closest number) its exactly in the middle, just between two other numbers (for example, 7 is just between 5 and 9) it will always go to the lowest closest number.
Any ideas of how to make it choose the upper one??? For example, 7 going to 9 instead of 5. Or way better... Any ideas of how to make it show the two options?
Make it show the two options will be way better.
Thanks!