View source: R/is_anticlockwise.R
is_anticlockwise | R Documentation |
Given a polygon, test if the polygon is a convex hull and if it is, if the vertices are listed in an anti-clockwise order.
is_anticlockwise(x)
x |
|
polygon
convex_hull
is_convex_hull
square1 <- polygon(c(-1, 1, 1, -1), c(-1, -1, 1, 1))
square2 <- polygon(c(1, 1, -1, -1), c(-1, 1, 1, -1))
square3 <- polygon(c(-1, 1, 1, -1), c(1, 1, -1, -1))
is_anticlockwise(square1)
is_anticlockwise(square2)
is_anticlockwise(square3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.