Selaa lähdekoodia

rename is_close_enough to is_within_pct

master
Jonathan Cobb 3 vuotta sitten
vanhempi
commit
f87d3b74f4
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. +1
    -1
      src/main/resources/org/cobbzilla/util/javascript/standard_js_lib.js

+ 1
- 1
src/main/resources/org/cobbzilla/util/javascript/standard_js_lib.js Näytä tiedosto

@@ -171,7 +171,7 @@ function pct_diff (x, y) {
}

// return true if x is "close enough" to y, in terms of max_pct (default is 1%)
function is_close_enough (x, y, max_pct) {
function is_within_pct (x, y, max_pct) {
return 100 - pct_diff(x, y) <= ((typeof max_pct == "undefined") ? 1.0 : max_pct);
}



Ladataan…
Peruuta
Tallenna