CGAL::top_vertex_2

Definition

#include <CGAL/Polygon_2_algorithms.h>

template <class ForwardIterator, class Traits>
ForwardIterator
top_vertex_2 ( ForwardIterator first,
ForwardIterator last,
Traits traits)
Returns an iterator to the topmost point from the range [first,last). In case of a tie, the point with the largest x-coordinate is taken.

Requirements

  1. Traits is a model of the concept PolygonTraits_2 . In fact, only the members Less_yx_2 and less_yx_2_object are used.
  2. ForwardIterator::value_type should be Traits::Point_2,

See Also

CGAL::left_vertex_2
CGAL::right_vertex_2
CGAL::bottom_vertex_2
CGAL::Polygon_2<PolygonTraits_2, Container>