Function

CGAL::orientation_2

Definition

The function orientation_2 computes if a polygon is clockwise or counterclockwise oriented.

#include <CGAL/Polygon_2_algorithms.h>

template <class ForwardIterator, class Traits>
Orientation orientation_2 ( ForwardIterator first, ForwardIterator last, Traits traits)

Precondition

is_simple_2(first, last, traits);

Requirements

  1. Traits is a model of the concept PolygonTraits_2 . Only the following members of this traits class are used:
  2. The value type of ForwardIterator must be Traits::Point_2,

See Also

PolygonTraits_2
CGAL::is_simple_2
CGAL::Polygon_2<PolygonTraits_2, Container>
CGAL::Orientation