Skip to contents

is_polygon2d() tests whether an object has a "Polygon2D" class

Usage

is_polygon2d(x)

Arguments

x

An object

Value

A logical value

Examples

p <- as_polygon2d(as_coord2d(x = c(0, 1, 1, 0), y = c(0, 0, 1, 1)))
is_polygon2d(p)
#> [1] TRUE