@Override protected Value evaluateValidSelf(final ProcessingContext context, final Value[] childValues, final int depth) { final double min = getMin().evaluateNotNull(this, context, "Computed value of min was NULL. Replacing with 0", 0); final double max = getMax().evaluateNotNull(this, context, "Computed value of max was NULL. Replacing with min+1", min+1); if (min > max) { /* Bad computed values */ context.fireRuntimeWarning(this, "Computed value of min (" + min + ") was greater than (" + max + "). Returning NULL"); return NullValue.INSTANCE; } final Random randomGenerator = context.getRandomGenerator(); final double randomNumber = randomGenerator.nextDouble(); final double randomFloat = min + (max - min) * randomNumber; return new FloatValue(randomFloat); } }