rotate2D: Rotate a 2D vector by an angle

View source: R/tools.r

rotate2DR Documentation

Rotate a 2D vector by an angle

Description

Rotates a two-dimensional vector about the origin.

Usage

rotate2D(x, angle)

Arguments

x

The two-component vector(s) that is (are) to be rotated. In case of multiple vectors, they should be in the form of a 2xn array or matrix.

angle

A single numeric specifying the angle by which to rotate about the origin, in radians.

Value

A two-component vector that contains the rotated x, or a matrix containing the rotated columns of x.

Author(s)

Eike Petersen


ime-luebeck/semgsim documentation built on April 14, 2022, 11:02 p.m.