I'm trying to check if a decimal number is in the bottom half or the top half with VB.NET.
For example:
If the number is 2.3 or 1.25333 or 1.000001 or 1, then it reports that the number is in the bottom half.
If the number is 0.5, 1.5, 2.5, 3.5, 4.5, then it reports that the number is in the middle
If the number is 0.7, 0.50001, 3.6111. 104.99999, then it reports that the number is in the top half.
This example means that if the numbers in the tenth place is greater then 5, then it reports that the number is in the top half. If the number is less then 5, then it reports the number is in the bottom half and if the number is equal to 5, then it reports that the number is equal to 5.
I cannot make this directly by testing for the number in the tenth place directly because the other numbers after it would need to be checked or rounded (for example, if the number is 3.5000000001, then it is not directly 5 but there is still a 5 in the tenth place).
How can I make a function that tells me if the number is in the top half, middle, or the bottom half in VB.NET?