Change Randoms.getProbability to use doubles.

Existing callers will merrily promote up, and this way we can match
the results over in the actionscript port in aspirin.
This commit is contained in:
David Hoover
2011-09-02 13:10:52 -07:00
parent cdbf87f7dd
commit 316dea118d
@@ -106,9 +106,9 @@ public class Randoms
/** /**
* Has a probability <code>p</code> of returning true. * Has a probability <code>p</code> of returning true.
*/ */
public boolean getProbability (float p) public boolean getProbability (double p)
{ {
return _r.nextFloat() < p; return _r.nextDouble() < p;
} }
/** /**