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

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

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

import java.util.Stack;


final class Neg implements PostScriptOperation {
	@Override
	/**
	 * num1 neg num2 

* * returns the negative of num1. The type of the result * is the same as the type of num1 unless num1 is the * smallest (most negative) integer, in which case the * result is a real number.

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