Skip to contents

Tests if shapes are (likely) developping clockwise or anticlockwise

Usage

coo_likely_clockwise(coo)

# S3 method for default
coo_likely_clockwise(coo)

# S3 method for Coo
coo_likely_clockwise(coo)

coo_likely_anticlockwise(coo)

Arguments

coo

matrix of (x; y) coordinates or any Coo object.

Value

a single or a vector of logical.

Examples

shapes[4] %>% coo_sample(64) %>% coo_plot()  #clockwise cat

shapes[4] %>% coo_likely_clockwise()
#> [1] TRUE
shapes[4] %>% coo_rev() %>% coo_likely_clockwise()
#> [1] FALSE

# on Coo
shapes %>% coo_likely_clockwise %>% `[`(4)
#>  cat 
#> TRUE