Learn R Programming

RRNA (version 1.2)

rotateS: Internal function to rotate a single point

Description

Rotates a point a given angle around a given center point.

Usage

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

Value

Returns a rotated point

Arguments

x2

x coordinate of the position being rotated

y2

y coordinate of the position being rotated

x0

x coordinate of the center of rotation

y0

y coordinate of the center of rotation

ang

rotatation angle in radians

Author

JP Bida

Examples

Run this code
### Rotate a point 90 degress ###
rotateS(0,1,0,0,pi/2)

Run the code above in your browser using DataLab