日期:2014-05-16  浏览次数:20374 次

怎么控制概率?思路如何?
我想这样的,一个转盘分成4块,可是怎么控制他们的概率不一样呢?要怎么写?

想不下去啊。。。。。求指引~chance为概率


$lottery_arr=array(
"0"=>array("id"=>1,"min"=>0,"max"=>90,"chance"=>10),
"1"=>array("id"=>2,"min"=>90,"max"=>180,"chance"=>20),
"2"=>array("id"=>3,"min"=>180,"max"=>270,"chance"=>30),
"3"=>array("id"=>4,"min"=>270,"max"=>360,"chance"=>40),
)




------解决方案--------------------
http://denghai260.blog.163.com/blog/static/7268640920128244332285/
这个能实现你的要求