rotate: Rotate

View source: R/rotate.R

rotateR Documentation

Rotate

Description

Rotate a polygon or convex hull.

Usage

rotate(x, times = 1L)

Arguments

x

a sccm_ch or sccm_pg object

times

(integer, default = 1), number vertices to rotate through

Details

The default call to rotate simply moves the first vertex to the last row of the vertex matrix and moves all the other rows up one, i.e.,

x$vertices <- x$vertices[c(2:nrow(x$vertices), 1), ].

For times > 1L, the above code line is evaluated times times.

The vertices and beta elements of sccm_pg objects are updated. sccm_ch objects have vertices, beta, and index updated.


dewittpe/sccm documentation built on Feb. 2, 2024, 5:25 p.m.