/** * Checks if the specified expression yields a float. Returns the float or throws an exception. * * @param ex expression to be evaluated * @param qc query context * @return float * @throws QueryException query exception */ protected final float toFloat(final Expr ex, final QueryContext qc) throws QueryException { final Item it = ex.atomItem(qc, info); if (checkNoEmpty(it, AtomType.FLT).type.isNumberOrUntyped()) return it.flt(info); throw numberError(this, it); }