/// Evolver Copyright 2000, Morgan McGuire
/// matrix@alum.mit.edu   http://graphics3d.com/matrix
public class Rotate extends TwoArgumentOperator implements ELOperator 
{
    public void apply(ELMatrix argument[], ELMatrix out, ELEnvironment environment)
    {
	checkArguments(argument);
        
	ELMatrix in = argument[0];
	ELMatrix angle = argument[1];
	
	out.setRotated(in, angle.average(0) * Math.PI); 
    }

    public String name()
    {
	return "Rotate";
    }

    public String description()
    {
	return "Rotates the 1st image by the average value of the red channel of the 2nd argument.";
    }  

    protected String iconString()
    {
	return "Rot";
    }
}
