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

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

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

import java.util.Stack;

final class Ceiling implements PostScriptOperation {
	@Override
	/**
	 * num1 ceiling num2 

* * returns the least integer value greater than or equal * to num1. The type of the result is the same as the type * of the operand.

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