// AspectRatio.java // by Scot Drysdale on 3/14/07 //Computes distance for aspect ratio distance measure. public class Angular extends Metric { // Returns the negative of the cosine of the angle. So -1 for 0 degrees, // 0 for 90 degrees 1 for 180 degrees. public double distance(Shape s, double x, double y) { return -s.findCosOfAngle(x, y); } }