Jump to content
Asterios
  • 0

Формула расчета вероятности ????


wizard

Question

У нас такая или нет ? 

double randRange(double min, double max)
{
double r = (double)rand() / 32767.0;

return min + r * (max - min);
}

if (randRange(0.0, 100.0) < сhange)
dosmth();

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Скорее всего у нас готовая последовательность используется. Только это не имеет значения для игроков. Для нас рандом вполне себе равномерный. Вычислить или воспроизвести последовательность не реально, так как она тысячу раз в секунду дергается.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...