Description Usage Arguments Value Author(s) Examples

View source: R/sl.checkposition.R

Check if a point is located to the left or to the right of a (directed) line, defined by two other points, on a sphere. This is equivalent to checking the direction of rotation of the resulting triangle.

1 | ```
sl.checkposition(a, b, c, ccw.defined.as = 1)
``` |

`a` |
Vector of length 2 with longitude and latitude of the start point of the line. |

`b` |
Vector of length 2 with longitude and latitude of the end point of the line. |

`c` |
Vector of length 2 with longitude and latitude of the point for which the position relative to the (great circle) line spanned from |

`ccw.defined.as` |
By default |

Scalar return value: `1`

if `c`

is located to the left (if the triangle `a-b-c`

rotates counterclockwise), `-1`

if `c`

is located to the right (if the triangle `a-b-c`

rotates clockwise), or `0`

if all points lie on one (great circle) line. (Values inverted if `ccw.defined.as=-1`

.))

Helge Goessling

1 2 3 | ```
sl.checkposition(a=c(0,0),b=c(90,0),c=c(45,1))
## Should return:
## [1] 1
``` |

helgegoessling/spheRlab documentation built on Sept. 29, 2018, 12:09 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.