R/acosangle.R

Defines functions acosangle

# From Yplant  (leaf.makeviewbound in Dpunit.pas)
acosangle <- function (a, b) {
    alen <- sqrt(sum(a^2))
    blen <- sqrt(sum(b^2))
	
	acosnum <- abs(sum(a*b))
	
	if(alen > 0)ang <- acosnum / alen
	if(blen > 0)ang <- acosnum / blen
	
    return(ang)
}

Try the YplantQMC package in your browser

Any scripts or data that you put into this service are public.

YplantQMC documentation built on May 29, 2017, 7:02 p.m.