开发者社区> 镜像站> NPM> midpoint
midpoint
find the midpoint of a line
Last updated 7 years ago by cwmma .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install midpoint 
SYNC missed versions from official npm registry.

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]

Current Tags

  • 0.0.2                                ...           latest (7 years ago)

3 Versions

  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
  • 0.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None