midpoint
v0.0.2
Published
find the midpoint of a line
Downloads
14
Readme
MidPoint
Find the midpoint of a line.
npm install midpoint
to use
midPoint([[0,0], [1,1], [2,2]]);// -> returns [1, 1]
midPoint([[0,0], [1,1], [2,2], [3,3]]);// -> returns [1.5, 1.5]
midPoint([[0,0], [1,1], [3,3]]);// -> returns [1.5, 1.5]