Computes cosine value of the angle for two vectors.

Description

This function implements the Law of Cosines to compute the cosine value of two vectors on BAF-LRR plot.

Usage

1
getCosine(v1, v2)

Arguments

v1

numeric vector

v2

numeric vector

Value

numeric cosine value

Author(s)

Bo Li

Examples

1
2
3
4
## See what happens to vectors with 45 degree angle
v1=c(1,1)
v2=c(1,0)
getCosine(v1,v2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.