rework scaling algorithm so it covers the whole range
rework scaling algorithm so it covers the whole range

i did this after some stress testing, now it covers the whole range on input

octo/liboping,octo/liboping,iseki-masaya/liboping,octo/liboping,barak/liboping,iseki-masaya/liboping,barak/liboping,iseki-masaya/liboping,octo/liboping,barak/liboping,iseki-masaya/liboping