当前位置:网站首页>Calculate the midpoint between two points
Calculate the midpoint between two points
2022-08-01 23:07:00 【Ziwei front end】
JavaScript version
const midpoint = (p1, p2) => [(p1.x + p2.x) / 2, (p1.y + p2.y) / 2];TypeScript version
interface Point {
x: number;
y: number;
}
const midpoint = (p1: Point, p2: Point): number[] => [(p1.x + p2.x) / 2, (p1.y + p2.y) / 2];边栏推荐
- Additional Features for Scripting
- excel clear format
- String - Trie
- 最短路模板
- System availability: 3 9s, 4 9s in SRE's mouth... What is it?
- From 0 to 1: Design and R&D Notes of Graphic Voting Mini Program
- Use Jenkins for continuous integration, this knowledge point must be mastered
- bat 之 特殊字符&转义
- cmd指令
- 毫秒级!千万人脸库快速比对,上亿商品图片检索,背后的极速检索用了什么神器?
猜你喜欢
随机推荐
xctf攻防世界 Web高手进阶区 webshell
如何给 UE4 场景添加游戏角色
excel remove all carriage return from a cell
Interpretation of the paper (GSAT) "Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism"
华为无线设备配置全局双链路冷备份(AC全局配置方式)
下载安装 vscode(含汉化、插件的推荐和安装)
1. @Component注解的原理剖析
B. Difference Array--Codeforces Round #808 (Div. 1)
解决端口占用
力扣第 304 场周赛复盘
[Recommended books] The first self-driving technology book
y84. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (15)
Deep Learning Course2 Week 2 Optimization Algorithms Exercises
三、mysql 存储引擎-建库建表操作
研发团队数字化转型实践
excel change cell size
从0到100:招生报名小程序开发笔记
深度学习Course2第二周Optimization Algorithms习题整理
论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
字符串——Trie









