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

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

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

import java.util.Stack;


final class Truncate implements PostScriptOperation {
	@Override
	/**
	 * num1 truncate num2 

* * truncates num1 toward 0 by removing its fractional part. * The type of the result is the same as the type of the * operand.

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