Learn R Programming

dagR (version 1.1.1)

distPoints: Calculate distance between two points.

Description

Another rather superfluous helper function, internally used by smoothArc. Calculates the distance between two points.

Usage

distPoints(A, B)

Arguments

A
Vector of length two, indicating x and y of first point.
B
Vector of length two, indicating x and y of second point.

Value

  • Distance between the two points.

Examples

Run this code
dp<-distPoints(c(0,0), c(1,1));
dp;
dp^2;

Run the code above in your browser using DataLab