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

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

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

import java.util.Stack;


final class Sub implements PostScriptOperation {
	@Override
	/**
	 * num1 num2 sub difference 

* * returns the result of subtracting num2 from num1. * 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) { double num2 = (Double)environment.pop(); double num1 = (Double)environment.pop(); environment.push(num1 - num2); } }