bearing.xy: Computes the heading between to cartesian points

Description Usage Arguments Value Examples

View source: R/trig.funs.R

Description

Computes the heading (radians counter clockwise from north or vertical)

Usage

1
bearing.xy(x1, x2, y1, y2)

Arguments

x1

Numeric; point A x value

x2

numeric; point B x value

y1

numeric; point A y value

y2

numeric; point B y value

Value

A single value in radians

a single value in radians

Examples

1
2
3
4
5
#example
A <- c(0,0)
B <- c(-5,5)
thet <- bearing.xy(A[1],B[1],A[2],B[2])
deg(thet)

ckenaley/trackter documentation built on Feb. 11, 2022, 6:43 a.m.