Open yankee42 opened 3 years ago
I was idling through the source code and than I found this:
((soc === 100) ? 1 : '0.' + ((soc < 10) ? ('0' + parseInt(soc)) : parseInt(soc)))
I stared at it for a while. Not sure if I may be missing something... But... if the purpose is to divide by 100, then I think I know an algorithm which is a little more compact and should also perform quicker with less memory overhead.
I was idling through the source code and than I found this:
I stared at it for a while. Not sure if I may be missing something... But... if the purpose is to divide by 100, then I think I know an algorithm which is a little more compact and should also perform quicker with less memory overhead.