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

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

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

import java.util.Stack;


final class Sin implements PostScriptOperation {
	@Override
	/**
	 * angle sin real 

* * returns the sine of angle, which is interpreted as an * angle in degrees. The result is a real number.

* * errors: stackunderflow, typecheck */ public void eval(Stack environment) { double radians = Math.toRadians((Double)environment.pop()); environment.push(Math.toDegrees(Math.sin(radians))); } }