MidPoint {LearnGeom}R Documentation

Computes the middle point of the segment that connects two points

Description

MidPoint computes the middle point of the segment that connects two points

Usage

MidPoint(P1, P2)

Arguments

P1

Vector containing the xy-coordinates of point 1

P2

Vector containing the xy-coordinates of point 2

Value

Returns a vector containing the xy-coordinates of the middle point of the segment that connects P1 and P2

Examples

P1 <- c(0,0)
P2 <- c(1,1)
mid <- MidPoint(P1, P2)

[Package LearnGeom version 1.5 Index]