code: protected Float getExpressionRatio(MediaExpression e)
      {
          if (e.size() == 2) //the ratio is two integer values
          {
              Term<?> term1 = e.get(0);
              Term<?> term2 = e.get(1);
              if (term1 instanceof TermInteger && term2 instanceof TermInteger
                      && (((TermInteger) term2).getOperator() == Operator.SLASH))
                  return ((TermInteger) term1).getValue() / ((TermInteger) term2).getValue();
              else
                  return null;
          }
          else
              return null;
      }
docs: Obtains the ratio specified by the given media query expression.
  @param e The media query expression specifying a ratio.
  @return The length converted to pixels or {@code null} when the value cannot be converted to ratio.