// FILE:      TriEdge.java
// PURPOSE:   To represent one edge which is made up of two points.
// METHOD:    Holds two Vertex2Ds
// MODS:      10.11.98 -- original [JL]
//
// CREATOR:   Jeremy Lueck (jlueck@mit.edu)

import Vertex2D;

public class TriEdge {

    protected Vertex2D endp0;
    protected Vertex2D endp1;

    public TriEdge(Vertex2D endp0, Vertex2D endp1) {
	this.endp0 = endp0;
	this.endp1 = endp1;
    }

    public float slope() {
	return (endp1.x - endp0.x) / (endp1.y - endp0.y);
    }

    public String toString() {
	return "[Edge: " + endp0 + "-" + endp1 + "]";
    }

}
