Cài đặt Steam
Đăng nhập
|
Ngôn ngữ
简体中文 (Trung giản thể)
繁體中文 (Trung phồn thể)
日本語 (Nhật)
한국어 (Hàn Quốc)
ไทย (Thái)
Български (Bulgaria)
Čeština (CH Séc)
Dansk (Đan Mạch)
Deutsch (Đức)
English (Anh)
Español - España (Tây Ban Nha - TBN)
Español - Latinoamérica (Tây Ban Nha cho Mỹ Latin)
Ελληνικά (Hy Lạp)
Français (Pháp)
Italiano (Ý)
Bahasa Indonesia (Indonesia)
Magyar (Hungary)
Nederlands (Hà Lan)
Norsk (Na Uy)
Polski (Ba Lan)
Português (Tiếng Bồ Đào Nha - BĐN)
Português - Brasil (Bồ Đào Nha - Brazil)
Română (Rumani)
Русский (Nga)
Suomi (Phần Lan)
Svenska (Thụy Điển)
Türkçe (Thổ Nhĩ Kỳ)
Українська (Ukraina)
Báo cáo lỗi dịch thuật
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