distance: Calculate distance between two points.

Description Usage Arguments Value

View source: R/grplot.R

Description

A vectorised function for calculating the distance between two points in Cartesian space. Computes the distance between (x[1], y[1]) and (x[2], y[2]).

Usage

1
  distance(x, y)

Arguments

x

A numeric vector of length 2, containing the x-coordinates of the two points

y

A numeric vector of length 2, containing the y-coordinates of the two points

Value

A numeric vector of length 1. The distance.


rjbgoudie/parental documentation built on May 27, 2019, 9:11 a.m.