Learn R Programming

trackter (version 0.1.1)

bearing.xy: Computes the heading between to cartesian points

Description

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

Usage

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

Run this code
# NOT RUN {
#example
A <- c(0,0)
B <- c(-5,5)
thet <- bearing.xy(A[1],B[1],A[2],B[2])
deg(thet)


# }

Run the code above in your browser using DataLab