[https://www.imgcook.com/](https://www.imgcook.com/)
[由定比分点求折线等分点的算法 OC版](https://www.jianshu.com/p/241ef477f595)
![](https://img.kancloud.cn/7c/93/7c9367610a7b8ece1ffef4741865a7e5_421x305.png)
``` js
/\*\*
\* 线段等分
\* @parampoint1 起始点
\* @parampoint2 终止点
\* @paramnum 等分数
\*/
functioncoordinate(point1, point2, num) {
varx1\=point1\[0\];
vary1\=point1\[1\];
varx2\=point2\[0\];
varx2\=point2\[1\];
varo\= \[point1\];
for (vari\=1; i<num; i++) {
varx\= (i\*x2+ (num\-i) \*x1) /num;
vary\= (i\* y2 + (num\-i) \*y1) /num;
o.push(\[x, y\]);
}
returno;
}
```
- 20200401
- 摘抄
- 句子
- 学习
- 20200402
- 计划学习
- 20200410
- 20200414
- 20200415
- generator
- css 布局
- wasm
- 20200416
- 门户网站首页
- 20200419
- vue 权限动态配置
- 20200422
- ui复用
- 20200424
- 20200426
- 20200507
- 20200512
- 20200513
- 20200514
- echart动态更新数据
- 20200515
- php二进制
- 20200525143706
- 20200527155935
- 20200714162545
- 2020072391629
- 20200731162304
- 20200804152925
- 2020081085649
- 20200904105420
- 20210125164426
- 20210315123537
- 20210420143721 已完成
- 2021042293334
- 20210422105259