Learn R Programming

LearnGeom (version 1.5)

DistanceLines: Computes the distance between two lines

Description

DistanceLines computes the distance between two lines

Usage

DistanceLines(Line1, Line2)

Arguments

Line1

Line object previously created with CreateLinePoints or CreateLineAngle

Line2

Line object previously created with CreateLinePoints or CreateLineAngle

Value

Returns the distance between two points

Examples

Run this code
# NOT RUN {
P1 <- c(0,0)
P2 <- c(1,1)
Line1 <- CreateLinePoints(P1, P2)
P3 <- c(1,-1)
P4 <- c(2,0)
Line2 <- CreateLinePoints(P3, P4)
d <- DistanceLines(Line1, Line2)
# }

Run the code above in your browser using DataLab