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

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

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

import java.util.Stack;

final class Exp implements PostScriptOperation {
	@Override
	/**
	 * base exponent exp real 

* * raises base to the exponent power. The operands may be * either integers or real numbers. If the exponent has a * fractional part, the result is meaningful only if the * base is nonnegative. The result is always a real number.

* * errors: stackunderflow, typecheck, undefinedresult */ public void eval(Stack environment) { double exponent = (Double)environment.pop(); double base = (Double)environment.pop(); environment.push(Math.pow(exponent, base)); } }