mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Hopefully put an end to all these percentage bugs in the web client
This commit is contained in:
@@ -206,7 +206,7 @@ Math.roundWithPrecision = function(floatnum, precision) {
|
||||
*/
|
||||
Math.ratio = function( numerator, denominator )
|
||||
{
|
||||
var result = Math.roundWithPrecision((numerator / denominator), 2);
|
||||
var result = Math.floor(100 * numerator / denominator) / 100;
|
||||
|
||||
// check for special cases
|
||||
if (isNaN(result)) result = 0;
|
||||
|
||||
Reference in New Issue
Block a user