Post
Topic
Board Project Development
Topic OP
Classic Dice Rule
by
amoonaser
on 09/02/2021, 17:03:10 UTC
Hello

I want to know classic dice rule. so i maked a simple example for this.

There is 3 field:

Code:
Roll Under:
<input type="text" id="roll" value="50.00">

Win Chance:
<input type="text" id="chance" value="50.0000">

Multiplier (Payout):
<input type="text" id="multiplier" value="1.9800">

And javascript code:

Code:
$('#range').change(function(e){

   let val = parseFloat($(this).val());
 
  $('#roll').val(val.toFixed(2));
  $('#chance').val(val.toFixed(4));
  $('#multiplier').val('How can calculate');

})

multiplier field have a formula. How can calculate this field ?