angle: Calculates angle of 2-dimensional vectors.

Description Usage Arguments Value Examples

Description

This function calculates the angle of x to y in anticlockwise.

Usage

1
angle(x, y)

Arguments

x

vector 1.

y

vector 2.

Value

angle in radian.

Examples

1
2
3
4
5
6
7
# a example of orthogonal vectors

angle(c(1, 0), c(0, 1))
# = 1 / 2 * pi

angle(c(0, 1), c(1, 0))
# = 3 / 2 * pi

hosscine/myfs documentation built on May 25, 2019, 6:20 p.m.