         this.stop = stop;
     }
 
+    /**
+     * Get the length of this line.
+     */
+    public function getLength () :Number
+    {
+        return Point.distance(start, stop);
+    }
+
     public function isIntersected (line :Line) :Boolean 
     {
         return getIntersectionType(line) != DOES_NOT_INTERSECT;
+    }
+
+    /**
+     * Return the point at which the other line intersects us.
+     */
+    public function getIntersectionPoint (line :Line) :Point
+    {
+        return getIntersection(line, true) as Point;
     }
 
     /**

        var thisLineStop :Point = trans.transformPoint(stop);
        var thatLineStart :Point = trans.transformPoint(line.start);
        var thatLineStop :Point = trans.transformPoint(line.stop);
        if (thatLineStart.y >= 0 && thatLineStop.y <= 0) {
            var interp :Point = Point.interpolate(thatLineStart, thatLineStop, thatLineStop.y / 
                (thatLineStop.y + (-thatLineStart.y)));
            if (interp.x >= 0 && interp.x <= thisLineStop.x) {
                return INTERSECTION_NORTH;
            } else {
                return DOES_NOT_INTERSECT;
            }
        } else if (thatLineStart.y <= 0 && thatLineStop.y >= 0) {
            interp = Point.interpolate(thatLineStop, thatLineStart, thatLineStart.y / 
                (thatLineStart.y + (-thatLineStop.y)));
            if (interp.x >= 0 && interp.x <= thisLineStop.x) {
                return INTERSECTION_SOUTH;
            } else {
                return DOES_NOT_INTERSECT;
            }
        } else {
            return DOES_NOT_INTERSECT;
        }
    }

    // from interface Equalable
    public function equals (o :Object) :Boolean
    {
        var other :Line = o as Line;
        if (other == null) {
            return false;
        }

        if (start == null || other.start == null) {
            if (start != other.start) {
                // not both null
                return false;
            }
        }
        if (stop == null || other.stop == null) {
            if (stop != other.stop) {
                // not both null
                return false;
            }
        }

        return (start == null || start.equals(other.start)) && 
               (stop == null || stop.equals(other.stop));
    }
}
}

     */
    public function getIntersectionType (line :Line) :int 
    {
        return getIntersection(line, false) as int;
    }

    // from interface Equalable
    public function equals (o :Object) :Boolean
    {
        var other :Line = o as Line; // or null if not a line
        if (other == null) {
            return false;
        }

        // both end points must be the same, in the same order
        return start.equals(other.start) && stop.equals(other.stop);
    }

    /**
     * Internal method that calculates whether the other line intersects
     * and returns either the intersected point or merely the intersection
     * type.
     */
    protected function getIntersection (line :Line, returnPoint :Boolean) :*
    {
        // rotate so that this line is horizontal, with the start on the left, at (0, 0)
        var trans :Matrix = new Matrix();
        trans.translate(-start.x, -start.y);
