Using Math equations for weighted random how probabilities work trigonometry pagination math slot math modulus