mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
WebUI: replace rounding function from MooTools
The `round()` returning floating point number is not a good idea. This is due to floating point representation is imprecise and sometimes it cannot faithfully represent a number, for example `0.09 + 0.01 !== 0.1 `. Therefore, it should be avoided and/or utilize other function to achieve the goal. Also, improve `window.qBittorrent.Misc.toFixedPointString()` and add test cases. PR #22281.
This commit is contained in:
parent
8da43a4054
commit
955688c125
8 changed files with 134 additions and 47 deletions
5
.github/workflows/ci_webui.yaml
vendored
5
.github/workflows/ci_webui.yaml
vendored
|
@ -34,7 +34,12 @@ jobs:
|
|||
run: |
|
||||
npm install
|
||||
npm ls
|
||||
echo "::group::npm ls --all"
|
||||
npm ls --all
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Lint code
|
||||
run: npm run lint
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue