Ejemplo n.º 1
0
 public boolean isTickExpression(String val) {
   val = val.trim();
   if (CMath.isMathExpression(val)) return true;
   int x = val.lastIndexOf(' ');
   if (x < 0) return CMath.isMathExpression(val);
   double multiPlier = getTickExpressionMultiPlier(val.substring(x + 1));
   if (multiPlier == 0.0) return CMath.isMathExpression(val);
   return CMath.isMathExpression(val.substring(0, x).trim());
 }
Ejemplo n.º 2
0
 public int parseTickExpression(String val) {
   val = val.trim();
   if (CMath.isMathExpression(val)) return CMath.s_parseIntExpression(val);
   int x = val.lastIndexOf(' ');
   if (x < 0) return CMath.s_parseIntExpression(val);
   double multiPlier = getTickExpressionMultiPlier(val.substring(x + 1));
   if (multiPlier == 0.0) return CMath.s_parseIntExpression(val);
   return (int)
       Math.round(CMath.mul(multiPlier, CMath.s_parseIntExpression(val.substring(0, x).trim())));
 }