rotate: Rotates a point (x,y) by an angle

Description Usage Arguments Value Examples

View source: R/rotate.R

Description

rotate calculates the coordinates for a point (x,y) after it rotates by an angle theta (radian)

Usage

1
rotate(xy, theta = 0)

Arguments

xy

A vector of length 2 representing the coordinates of a point in cartesian system

theta

A number rotating angle in radian

Value

Coordinates of the point after the rotation

Examples

1
rotate(c(1000, 0), theta=pi/6)

binovisualfields documentation built on March 13, 2020, 1:35 a.m.