def each_edge(close = true)
      raise ChunkyPNG::ExpectationFailed, "Not enough points in this path to draw an edge!" if length < 2
      points.each_cons(2) { |a, b| yield(a, b) }
      yield(points.last, points.first) if close
    end
def each_edge(close = true)
      raise ChunkyPNG::ExpectationFailed, "Not enough points in this path to draw an edge!" if length < 2
      points.each_cons(2) { |a, b| yield(a, b) }
      yield(points.last, points.first) if close
    end
Initializes a vector based on a list of Point instances.

 You usually do not want to use this method directly, but call {ChunkyPNG.Vector} instead.

 @param [Array<ChunkyPNG::Point>] points
 @see ChunkyPNG.Vector
 Iterates over all the edges in this vector.

 An edge is a combination of two subsequent points in the vector. Together, they will form
 a path from the first point to the last point

 @param [true, false] close Whether to close the path, i.e. return an edge that connects the last
   point in the vector back to the first point.
 @return [void]
 @raise [ChunkyPNG::ExpectationFailed] if the vector contains less than two points.
 @see #edges