I currently need to round the numbers to their nearest main number. (Not sure if there is a correct term here)
But look at an example of what I'm trying to achieve.
IE: 13 // 20 349 // 400 5645 // 6000 9892 // 10000 13988 // 20000 93456 // 100000 231516 // 300000 etc. etc.
I implemented a way to do this, but it is so painful and only processes numbers up to a million, and if I want it to be higher, I need to add additional if statements (yes, let's see how I applied it: P im not very proud, but the brain is stuck)
There should be something there already, but google doesnโt help me much, probably due to the fact that I donโt know the correct term for such rounding that I want to do
Tristan
source share