示例#1
0
  public void run(Stack inStack) throws ParseException {
    checkStack(inStack); // check the stack

    Object param2 = inStack.pop();
    Object param1 = inStack.pop();

    inStack.push(power(param1, param2));
  }
示例#2
0
文件: Cosine.java 项目: Kailashrb/Jep
 public void run(Stack inStack) throws ParseException {
   checkStack(inStack); // check the stack
   Object param = inStack.pop();
   inStack.push(cos(param)); // push the result on the inStack
   return;
 }