84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
Math.floor(Math.random()*(max-min)+min);//取不到max
Math.round(Math.random()*(max-min)+min);//可以取到min,也可以取到max,更合理一点
老师,随机问题用floor方法,永远取不要最大值,为什么不用round?-PHP中文网问答-老师,随机问题用floor方法,永远取不要最大值,为什么不用round?-PHP中文网问答
围观一下哦,学习一下。
嗯,是的,确实更合理点,你思考的很仔细
老师,随机问题用floor方法,永远取不要最大值,为什么不用round?-PHP中文网问答-老师,随机问题用floor方法,永远取不要最大值,为什么不用round?-PHP中文网问答
围观一下哦,学习一下。
嗯,是的,确实更合理点,你思考的很仔细