Currently works for all classes inside of the object-class.
Arguments
- object
Object of the
object-class.- x
Numeric vector or matrix containing x- and y-coordinates to be checked.
Examples
# Create an object
my_circle <- circle(center = c(0, 0), radius = 1)
# Let's create a matrix of different coordinates of which the first is
# inside of the object, the second on its circumference, and the third
# outside of the object
coords <- rbind(c(0, 0),
c(1, 0),
c(2, 0))
# Let's do the test
in_object_rcpp(my_circle, coords)
#> [1] TRUE FALSE FALSE