posflux: Calculate flux outward from triangle

Usage Arguments Examples

View source: R/posflux.R

Usage

1
posflux(v1, v2)

Arguments

v1
v2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (v1, v2) 
{
    rotation = function(rad) matrix(c(cos(rad), sin(rad), sin(-rad), 
        cos(rad)), nrow = 2, ncol = 2)
    rotate90 = round(rotation(pi/2), digits = 1e-10)
    ifelse(dotprod(rotate90 %*% v1, v2) > 0, 1, 0) * abs(crossprod_fn(v1, 
        v2))
  }

James-Thorson/movement_tools documentation built on May 7, 2019, 10:19 a.m.