This is a re-implementation of the corresponding method from package gpclib to also allow centering.

# S3 method for gpc.poly
scale(x, center = c(0,0), scale = c(1,1))

Arguments

x

an object of class "gpc.poly".

center

numeric vector of length 2 (x,y), which will be subtracted from the respective coordinates of x.

scale

numeric vector of length 2 (x,y), which serves as the divisor for the respective coordinates of x.

Value

A "gpc.poly", the shifted and/or scaled version of x.