Learn R Programming

RRNA (version 1.2)

rotateV: internal function to rotate a vector of points

Description

Rotates a set of points around a center point a given number of radians

Usage

rotateV(x2, y2, x0, y0, ang)

Value

set of rotated points

Arguments

x2

Vector containing x coordinates being rotated

y2

Vector containing y coordinates being rotated

x0

x coordinate of center of rotation

y0

y coordinate of center of rotation

ang

Angle of rotation given in radians

Author

JP Bida

See Also

rotateS

Examples

Run this code
x=c(1,0,-1,0)
y=c(0,1,0,-1)
pts=rotateV(x,y,0,0,pi/4)

Run the code above in your browser using DataLab