【文件属性】:
文件名称:point-distance:获取 2d、3d 或类地球平面上两点之间的距离
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-30 22:18:35
JavaScript
点距
获取 2d、3d 或类地球平面上两点之间的距离。
安装
npm install point-distance
用法
const pointDistance = require ( "point-distance" )
console . log ( pointDistance ( [ 0 , 0 ] , [ 3 , 4 ] ) )
//=> 5
console . log ( pointDistance ( [ 0 , 0 , 0 ] , [ 3 , 12 , 4 ] ) )
//=> 13
console . log ( pointDistance . earth ( [ - 36.848161 , 174.762256 ] , [ - 36.848513 , 174.7635 ] ) )
//=> 117.6259
应用程序接口
pointDistance([startX,
【文件预览】:
point-distance-master
----.github()
--------FUNDING.yml(753B)
--------CODE_OF_CONDUCT.md(3KB)
--------ISSUE_TEMPLATE()
----test.js(290B)
----license(1KB)
----.travis.yml(55B)
----index.d.ts(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----index.js(906B)
----readme.md(1KB)
----package.json(766B)