Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGustavo Rodrigues <qgustavor@users.noreply.github.com>2018-03-24 01:22:18 +0300
committerGitHub <noreply@github.com>2018-03-24 01:22:18 +0300
commit69a89da6414d7566c494e781bc8d7e5036ea84be (patch)
treee4fc931c2f74e90b606208fa9044b933ea3997cc /docs
parentb53d224cdea46173ea97dc9eea7eaf5a6e7a55b9 (diff)
Fix ratio limit in documentation
The value of ratio isn't limited to 0-1, which can be checked in the two first links below. It probably was a mistake caused by copy-pasting the documentation of "progress", which is limited to 0-1. The commit where this extra info was added is the one in the third link. - https://github.com/webtorrent/webtorrent/blob/b53d224cdea46173ea97dc9eea7eaf5a6e7a55b9/lib/torrent.js#L177-L179 - https://github.com/webtorrent/webtorrent/blob/b53d224cdea46173ea97dc9eea7eaf5a6e7a55b9/index.js#L195-L205 - https://github.com/webtorrent/webtorrent/commit/6f2e85cd4649b3f1ddd67be9f4832c0138849b3e As this value is the result of something like `uploaded / max(1, downloaded)` it never get's to `Infinity`, so it's limited by 0 and `uploaded`. Without the ` || 1` part it would be limited between 0 and infinity.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api.md b/docs/api.md
index 013babd..f07f48f 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -196,7 +196,7 @@ Total download progress for all **active** torrents, from 0 to 1.
## `client.ratio`
-Aggregate "seed ratio" for all torrents (uploaded / downloaded), from 0 to 1.
+Aggregate "seed ratio" for all torrents (uploaded / downloaded).
# Torrent API
@@ -252,7 +252,7 @@ Torrent download progress, from 0 to 1.
## `torrent.ratio`
-Torrent "seed ratio" (uploaded / downloaded), from 0 to 1.
+Torrent "seed ratio" (uploaded / downloaded).
## `torrent.numPeers`