getAngle2d: Angles between vectors.

View source: R/getangle2d.R

getAngle2dR Documentation

Angles between vectors.

Description

Calcul the angles of two set of vectors.

Usage

getAngle2d(x0, y0, x1, y1, rad = FALSE)

Arguments

x0, y0

the x and y coordinates of the first set of vector.

x1, y1

the x and y coordinates of the second set of vector.

rad

a logical. Should angles be expressed radians?

Examples

# Example:
plot0(c(-10, 10), c(-10, 10))
arrows(c(0, 3), c(0, 0), c(3, 0), c(3, -3))
cool <- getAngle2d(c(0, 3), c(0, 0), c(3, 0), c(3, -3))


KevCaz/graphicsutils documentation built on Sept. 16, 2022, 10:05 a.m.