当前位置:网站首页>Pyqt5 development tips - obtain Manhattan distance between coordinates
Pyqt5 development tips - obtain Manhattan distance between coordinates
2022-07-06 08:00:00 【[email protected]】
PyQt5 Development tips—— Get Manhattan distance between coordinates
Introduction to Manhattan distance
We can define the formal meaning of Manhattan distance as L1- Distance or city block distance , That is to say, the sum of the distance of the projection of the line segment formed by two points to the axis in the fixed rectangular coordinate system of Euclidean space .
For example, on the plane , coordinate (x1, y1) The point of P1 And coordinates (x2, y2) The point of P2 The Manhattan distance is :
It should be noted that , Manhattan distance depends on the rotation of the coordinate system , Not the translation or mapping of the system on the coordinate axis .
The reason why Manhattan distance is named is from the city planned as a square building block ( Such as Manhattan ) between , The shortest driving path ( Ignore the one-way lanes in Manhattan and only exist in 3、14 The oblique lane of the avenue ). Any three blocks to the East 、 The path to Beiliu block must take at least block 9 , There is no other shortcut .
API
int manhattanLength (self)
x = (btn1.pos() - btn2.pos()).manhattanLength()
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131848202817.html
边栏推荐
- 数据治理:误区梳理篇
- [t31zl intelligent video application processor data]
- Data governance: data quality
- [factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems
- Codeforces Global Round 19(A~D)
- (lightoj - 1410) consistent verbs (thinking)
- flask返回文件下载
- [Yugong series] February 2022 U3D full stack class 010 prefabricated parts
- ROS learning (IX): referencing custom message types in header files
- Mex related learning
猜你喜欢

Interview Reply of Zhuhai Jinshan

链表面试题(图文详解)

hcip--mpls
![07- [istio] istio destinationrule (purpose rule)](/img/be/fa0ad746a79ec3a0d4dacd2896235f.jpg)
07- [istio] istio destinationrule (purpose rule)

Solution: intelligent site intelligent inspection scheme video monitoring system
![[factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems](/img/6d/282d904810807810adb06b071fb39b.jpg)
[factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems

"Designer universe": "benefit dimension" APEC public welfare + 2022 the latest slogan and the new platform will be launched soon | Asia Pacific Financial Media

The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable

How to prevent Association in cross-border e-commerce multi account operations?

National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
随机推荐
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
49. Sound card driven article collection
[count] [combined number] value series
Epoll and IO multiplexing of redis
Document 2 Feb 12 16:54
The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
【Redis】NoSQL数据库和redis简介
实现精细化生产, MES、APS、ERP必不可少
24. Query table data (basic)
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
08- [istio] istio gateway, virtual service and the relationship between them
[非线性控制理论]9_非线性控制理论串讲
二叉树创建 & 遍历
CAD ARX 获取当前的视口设置
Golang DNS 随便写写
指针和数组笔试题解析
Asia Pacific Financial Media | female pattern ladyvision: forced the hotel to upgrade security. The drunk woman died in the guest room, and the hotel was sentenced not to pay compensation | APEC secur
Asia Pacific Financial Media | art cube of "designer universe": Guangzhou community designers achieve "great improvement" in urban quality | observation of stable strategy industry fund
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
What are the ways to download network pictures with PHP