@Test public void testRandomFloat() throws Exception { final RandomFloat rf = new RandomFloat(new Random()); for(int i = 0; i < 5000; ++i) { final Symbol result = rf.execute(rhsFuncContext, new ArrayList<Symbol>()); assertNotNull(result); assertNotNull(result.asDouble()); final double value = result.asDouble().getValue(); assertTrue(value >= 0.0 && value < 1.0); } }
public RandomFloat(Random random) { super("random-float", 0, 0); this.random = random; }
RandomFloat extends AbstractRhsFunctionHandler { public RandomFloat(Random random) { super("random-float", 0, 0); this.random = random; } }
RandomFloat extends AbstractRhsFunctionHandler { public RandomFloat(Random random) { super("random-float", 0, 0); this.random = random; } RandomFloat(Random random); }
RandomFloat extends AbstractRhsFunctionHandler { public RandomFloat(Random random) { super("random-float", 0, 0); this.random = random; } RandomFloat(Random random); @Override Symbol execute(RhsFunctionContext context, List<Symbol> arguments); }
RandomFloat extends AbstractRhsFunctionHandler { public RandomFloat(Random random) { super("random-float", 0, 0); this.random = random; } RandomFloat(Random random); @Override Symbol execute(RhsFunctionContext context, List<Symbol> arguments);  }