Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

angle

Calculate radian angle of line between two points.


Description

Calculates the radian angle of the line connecting two points. Internally called by smoothArc.

Usage

angle(A, B)

Arguments

A

Vector of length two indicating the coordinates of the first point.

B

Vector of length two indicating the coordinates of the second point.

Value

A numeric value [0, 2*pi).

Author(s)

Lutz P Breitling <l.breitling@posteo.de>

See Also

Examples

angle(c(0,0), c( 0,-1)) /pi;
angle(c(0,0), c(-1,-1)) /pi;
angle(c(0,0), c(-1, 0)) /pi;
angle(c(0,0), c(-1, 1)) /pi;
angle(c(0,0), c( 0, 1)) /pi;
angle(c(0,0), c( 1, 1)) /pi;
angle(c(0,0), c( 1, 0)) /pi;
angle(c(0,0), c( 1,-1)) /pi;

dagR

R Functions for Directed Acyclic Graphs

v1.2.0
GPL-2
Authors
Lutz P Breitling
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.