Починить коэффициенты команд
На сайте используется Laravel и есть система ставок на матчи Dota 2, проблема в том, что изначально был не верный код расчета коэффициентов, был написан вот такой код:
$opponentTeamSum / $selectedTeamSum
Сейчас же нужно изменить на немного другую формулу:
($opponentTeamSum + $selectedTeamSum) / $selectedTeamSum
После попытки изменений появилась проблема в том, что при одинаковой сумме ставок, но на разные команды происходит каша, например:
На команду А я ставлю 1$, на команду Б ставлю 5$, на команду А ставлю 9.99$, получаю окончательные коэффициенты ставок на команду x1,45, x4,20, а в базе когда юзер оформляет ставки пишутся коэффициенты: 1.31, 1.20, 1.31 (это с учетом 10% комиссии). В данном случае 1.31 и 1.45 это верные коэффициенты, но вот коэффициент 1.20 неверен, нужно чтоб писалось как и кэф на команду 4.20. Если я ставлю те же суммы, только в другом порядке: на команду А 1$, на команду А 9.99$, на команду Б 5$, получаю коэффициенты: 0.55, 3.21, а в базе 1.00, 1.00, 2.89, в данном случае 2.89 и 3,21 правильный коэффициент, а вот коэффициент меньше 1 быть не может.
Т.е нужно правильно применить эту формулу и после ставки нужно обновлять все раннее поставленные ставки, а именно их коэффициенты на этот матч.
Предлагайте вашу цену.
-
Приветствую!
Выполню быстро и качественно
Обращайтесь - буду рад сотрудничеству
-
98 здравствуйте
нужны отзывы на этой платформе, по цене можем договориться
telega
gexayr
Пишите обсудим.
-
Ваш проект под гитом? Локально он разворачивается без проблем?
-
Current freelance projects in the category PHP
Integration needed: KeyCRM → Cash Register KashalotIt is necessary to set up integration between KeyCRM and the Cash Register Kahalot. When placing an order in KeyCRM, the data must be automatically transmitted to Kahalot: • order information • products, nomenclature • prices • quantity More details in private. Content Management Systems, PHP ∙ 1 day 9 hours back ∙ 27 proposals |
A WordPress site using the Kadence theme and Kadence Blocks.
225 USD
We need to create a website on WordPress using the Kadence theme and Kadence Blocks. There will be no online store (although it may be added in the future). We need a homepage and several internal pages. The graphics are already prepared, the layout structure is mostly defined,… Content Management Systems, PHP ∙ 2 days 19 hours back ∙ 38 proposals |
Development of 2 SEO-oriented websites for selling spare parts (ATVs and special equipment)Development of Two Specialized Websites for Selling Spare PartsGeneral Information It is necessary to develop two specialized websites: Spare parts for ATVs, UTVs, SSVs, and other similar equipment. Spare parts for special equipment. Existing company website:… PHP, Web Programming ∙ 3 days 16 hours back ∙ 77 proposals |
Development of a WordPress website
23 USD
We are looking for a contractor to develop a custom website on WordPress for a jewelry store. The first stage will be a consultation. Content Management Systems, PHP ∙ 6 days 8 hours back ∙ 73 proposals |
Parser expireddomains.net
112 USD
A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write. PHP, Web Programming ∙ 8 days 16 hours back ∙ 52 proposals |