0
我想用這段代碼生成一個隨機的float。生成Random.nextFloat()參數錯誤
float rangeDuration2 = maxDuration - minDuration;
但由於某些原因未啓用的java讓我與這條線我會.nextInt()
在類型隨機的方法nextFloat()是不適用的參數(浮點)
float actualDuration2 = rand.nextFloat(rangeDuration2) + minDuration;
無論如何圍繞這嗎?
請參閱:http://stackoverflow.com/questions/6078157/random-nextfloat-is-not-applicable-for-floats – fivedigit 2012-01-10 01:04:15