powered by
MidPoint computes the middle point of the segment that connects two points
MidPoint
MidPoint(P1, P2)
Vector containing the xy-coordinates of point 1
Vector containing the xy-coordinates of point 2
Returns a vector containing the xy-coordinates of the middle point of the segment that connects P1 and P2
P1
P2
# NOT RUN { P1 <- c(0,0) P2 <- c(1,1) mid <- MidPoint(P1, P2) # }
Run the code above in your browser using DataLab