All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openpdf.renderer.function.postscript.operation.Add Maven / Gradle / Ivy

The newest version!
package org.openpdf.renderer.function.postscript.operation;

import java.util.Stack;

final class Add implements PostScriptOperation {
	@Override
	/**
	 * num1 num2 add sum 

* * If both operands are integers and the result is * within integer range, the result is an integer; * otherwise, the result is a real number.

* * errors: stackunderflow, typecheck, undefinedresult */ public void eval(Stack environment) { environment.push((Double)environment.pop() + (Double)environment.pop()); } }