Nainstalovat Steam
přihlásit se
|
jazyk
简体中文 (Zjednodušená čínština)
繁體中文 (Tradiční čínština)
日本語 (Japonština)
한국어 (Korejština)
ไทย (Thajština)
български (Bulharština)
Dansk (Dánština)
Deutsch (Němčina)
English (Angličtina)
Español-España (Evropská španělština)
Español-Latinoamérica (Latin. španělština)
Ελληνικά (Řečtina)
Français (Francouzština)
Italiano (Italština)
Bahasa Indonesia (Indonéština)
Magyar (Maďarština)
Nederlands (Nizozemština)
Norsk (Norština)
Polski (Polština)
Português (Evropská portugalština)
Português-Brasil (Brazilská portugalština)
Română (Rumunština)
Русский (Ruština)
Suomi (Finština)
Svenska (Švédština)
Türkçe (Turečtina)
Tiếng Việt (Vietnamština)
Українська (Ukrajinština)
Nahlásit problém s překladem
I think that "out" was meant to be "our".
"This gives us a value equal to some freaction of the damage we can use to fluctuate the value a bit."
I think that "freaction" was meant to be "fraction".
The function Math.random() generates a value between 0 and (very, very close to) 1. The value you get from this will be a decimal so Math.floor() is used to round down. The +1 is added as the random value will never be exactly 1. And when you multiple just your max value by 0.9999... and round down it will always end up 1 below that value. The minimum value is subtracted from the multiplication as it will later be added back to the final value.
For our example:
(0.9999 * 46) + 5
45.9954 + 5
50.9954 which is then rounded down to 50.
(0 * 46) + 5
0 + 5