package transformer;

import timedistortion.Point;
import timedistortion.ITransform;

public class Radial extends AbstractTransformer implements ITransform {
	
	private static final float speed = -0.1f;

	@Override
	public void t(Point p) {
		int diff_x = p.dx - ictx.width / 2; 
		int diff_y = p.dy - ictx.height / 2; 
		float r = speed * (float) Math.sqrt(diff_x * diff_x + diff_y * diff_y);
		float pos = p.ti + r;
		interpolate_linear(p, pos);
	}

}
