当前位置:网站首页>Check if point is inside rectangle
Check if point is inside rectangle
2022-08-01 23:07:00 【Ziwei front end】
JavaScript version
const isInside = (point, rect) => point.x > rect.left && point.x < rect.right && point.y > rect.top && point.y < rect.bottom;TypeScript version
interface Point {
x: number;
y: number;
}
interface Rect {
bottom: number;
left: number;
top: number;
right: number;
}
const isInside = (point: Point, rect: Rect): boolean => point.x > rect.left && point.x < rect.right && point.y > rect.top && point.y < rect.bottom;边栏推荐
- vscode hide menu bar
- Chapter 19 Tips and Traps: Common Goofs for Novices
- Chapter 11 Working with Dates and Times
- npm npm
- vscode hide menu bar
- Prufer sequence
- Deep Learning Course2 Week 2 Optimization Algorithms Exercises
- UML diagram of soft skills
- Deep learning Course2 first week Practical aspects of Deep Learning exercises
- 10年稳定性保障经验总结,故障复盘要回答哪三大关键问题?|TakinTalks大咖分享
猜你喜欢

Quarantine and downgrade

Small application project works WeChat stadium booking applet graduation design of the finished product (1) the development profile

APP special test: traffic test

chrome复制一张图片的base64数据

y84.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十五)

Codeforces CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) A-D 题解

Codeforces CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) A-D Solution

程序员如何优雅地解决线上问题?

How to add a game character to a UE4 scene

访问控制台中的选定节点
随机推荐
数据增强--学习笔记(图像类,cnn)
Wechat Gymnasium Appointment Mini Program Graduation Design Finished Work (4) Opening Report
Interpretation of the paper (GSAT) "Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism"
Jmeter是什么
String - Trie
联邦学习的框架搭建
D - Linear Probing- 并查集
小程序毕设作品之微信美食菜谱小程序毕业设计成品(7)中期检查报告
加载字体时避免隐藏文本
【Verilog刷题篇】硬件工程师从0到入门1|基础语法入门
chrome复制一张图片的base64数据
联邦学习在金融领域的发展和应用
隔离和降级
ROS2初级知识(8):Launching启动多节点
毫秒级!千万人脸库快速比对,上亿商品图片检索,背后的极速检索用了什么神器?
研发团队数字化转型实践
还在纠结报表工具的选型么?来看看这个
欧拉路径与欧拉回路
y84. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (15)
如何使用pywinauto和pyautogui将动漫小姐姐链接请回家