Learn R Programming

CHAT (version 1.1)

Dist: Distance from point to a line

Description

Compute point to line distance, internal use.

Usage

Dist(x0, y0, A, B, C)

Arguments

x0
x coordinate of the point
y0
y coordinate of the point
A,B,C
coefficient for a line Ax+By+C=0.

Value

numeric value of the distance

Examples

Run this code
x0=0.12
y0=0.45
d=Dist(x0,y0,1,1,-0.2)

Run the code above in your browser using DataLab