sl.cart.dist | R Documentation |
Compute Cartesian distance between two points in any dimension.
sl.cart.dist(a, b = NULL, norm = 2)
a |
a scalar or numerical vector of any length giving the location of one point |
b |
a scalar or numerical vector of the same length as |
norm |
With the default value |
Single scalar providing the distance.
Helge Goessling
sl.gc.dist
## Example in 3 dimensional space:
sl.cart.dist(a=c(0,0,0),b=c(1,1,1))
## Should return:
## [1] 1.732051
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.