public static double requirePositive(double val) {
        if (Double.compare(val, 0d) <= 0) {
            throw new IllegalArgumentException(val + IS_NOT_POSITIVE);
        }
        return val;
    }
Returns the given value if it is positive (greater than {@code 0}).

@param val  to check
@return     the given value

@throws IllegalArgumentException if the given value is not positive
common-parent/invariant/src/main/java/com/speedment/common/invariant/DoubleRangeUtil.java