Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何找到由 2 个二维向量形成的矩形的面积。例如:p1 = (20, 40); p2 = (30, 60);
我需要找到这个形成的矩形。有没有常用的公式?
只需将矩形边的长度相乘,即两个向量坐标之间的差:
(p2.X - p1.X) * (p2.Y - p1.Y)