From 316dea118d8f8eae60dfb84038f17317f950d90d Mon Sep 17 00:00:00 2001 From: David Hoover Date: Fri, 2 Sep 2011 13:10:52 -0700 Subject: [PATCH] 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. --- src/main/java/com/samskivert/util/Randoms.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/samskivert/util/Randoms.java b/src/main/java/com/samskivert/util/Randoms.java index 4a6e7998..6694cc21 100644 --- a/src/main/java/com/samskivert/util/Randoms.java +++ b/src/main/java/com/samskivert/util/Randoms.java @@ -106,9 +106,9 @@ public class Randoms /** * Has a probability p of returning true. */ - public boolean getProbability (float p) + public boolean getProbability (double p) { - return _r.nextFloat() < p; + return _r.nextDouble() < p; } /**