1 | posflux(v1, v2)
|
v1 |
|
v2 |
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))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.