File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88### Added
9+ - Auto increase decimalPlaces for small number.
910
1011### Changed
1112- Change: Rollback the algorithm about deltaTime
Original file line number Diff line number Diff line change @@ -337,7 +337,16 @@ let BestDealHelper = {
337337 span . textContent = "" ;
338338 continue ;
339339 }
340- span . textContent = " 💹" + Beautify ( me . cpsAcceleration * 100 / avg , 2 ) + "%" ;
340+ // Auto increase decimalPlaces for small number
341+ let value ;
342+ for ( let i = 0 ; i < 15 ; i ++ ) {
343+ value = Beautify ( me . cpsAcceleration * 100 / avg , i ) ;
344+ if ( value !== "0" ) {
345+ value = Beautify ( me . cpsAcceleration * 100 / avg , i + 1 ) ;
346+ break ;
347+ }
348+ }
349+ span . textContent = " 💹" + value + "%" ;
341350 if ( me . waitingTime ) span . textContent += " ⏳" + me . waitingTime ;
342351 if ( me . BestHelper ) {
343352 MOD . rainbow ( span ) ;
You can’t perform that action at this time.
0 commit comments