当前位置:网站首页>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];
边栏推荐
- excel change cell size
- 【数据分析03】
- 字符串——Trie
- 03、GO语言变量定义、函数
- 分享10套开源免费的高品质源码,免费源码下载平台
- excel edit a cell without double clicking
- Postman 批量测试接口详细教程
- Error creating bean with name ‘dataSource‘:Unsatisfied dependency expressed through field ‘basicPro
- Codeforces CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) A-D Solution
- 联邦学习在金融领域的发展和应用
猜你喜欢
SQL29 Calculate the average next day retention rate of users
PHP算法之电话号码的字母组合
牛客多校4 A.Task Computing 思维
y84.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十五)
使用Jenkins做持续集成,这个知识点必须要掌握
【Verilog刷题篇】硬件工程师从0到入门1|基础语法入门
Deep Learning Course2 Week 2 Optimization Algorithms Exercises
程序员如何优雅地解决线上问题?
Flutter基础学习(一)Dart语言入门
小程序毕设作品之微信美食菜谱小程序毕业设计成品(8)毕业设计论文模板
随机推荐
对于在新标签页中打开的链接,始终使用“noopener”或“noreferrer”
TCP 可靠吗?为什么?
ROS2初级知识(8):Launching启动多节点
字符串——Trie
如何使用pywinauto和pyautogui将动漫小姐姐链接请回家
小程序毕设作品之微信体育馆预约小程序毕业设计成品(1)开发概要
Use Jenkins for continuous integration, this knowledge point must be mastered
(Translation) How the contrasting color of the button guides the user's actions
PAM Palindromic Automata
访问控制台中的选定节点
从0到100:招生报名小程序开发笔记
xss相关知识点以及从 XSS Payload 学习浏览器解码
qt-faststart 安装使用
excel cell contian two words, seperated by a slash
1391D. 505 状压dp
vscode hide menu bar
A. Doremy‘s IQ-- Codeforces Round #808 (Div. 1)
计算由两点定义的线的角度
xctf attack and defense world web master advanced area webshell
【SeaTunnel】从一个数据集成组件演化成企业级的服务