Merge pull request #102 from peter50216/patch-2

Update rate range to match intceil
master
Mike Bryant 4 years ago committed by GitHub
commit da1d75ba51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,11 +44,11 @@ function intceil(val) {
}
function minimum_rate_from_given_and_base(given_price, buy_price) {
return 10000 * (given_price - 1) / buy_price;
return 10000 * (given_price - 0.99999) / buy_price;
}
function maximum_rate_from_given_and_base(given_price, buy_price) {
return 10000 * given_price / buy_price;
return 10000 * (given_price + 0.00001) / buy_price;
}
function* generate_pattern_0_with_lengths(given_prices, high_phase_1_len, dec_phase_1_len, high_phase_2_len, dec_phase_2_len, high_phase_3_len) {

Loading…
Cancel
Save