• 2023-11-13[Leetcode] 0836. 矩形重叠
    836.矩形重叠EnglishVersion题目描述矩形以列表[x1,y1,x2,y2]的形式表示,其中(x1,y1)为左下角的坐标,(x2,y2)是右上角的坐标。矩形的上下边平行于x轴,左右边平行于y轴。如果相交的面积为正,则称两矩形重叠。需要明确的是,只在角或边接触的两个矩形不构成重叠。
  • 2023-05-30leetcode 836. Rectangle Overlap
    Arectangleis representedasa list[x1,y1,x2,y2],where (x1,y1) arethecoordinatesofitsbottom-leftcorner,and(x2, y2) arethecoordinatesofitstop-rightcorner.Tworectanglesoverlapiftheareaoftheirintersectionispositive. Tobecl
  • 2023-03-11leetcode-836-easy
    RectangleOverlapAnaxis-alignedrectangleisrepresentedasalist[x1,y1,x2,y2],where(x1,y1)isthecoordinateofitsbottom-leftcorner,and(x2,y2)
  • 2023-01-08【Unity TIL】6. 如何判断两条线段是否相交
    AABB碰撞检测,也就是轴对齐碰撞检测,用平行于x,y轴的矩形表示物体。如何判断两个矩形是否相撞,可以通过分别判断x,y轴上的线段是否相交。假设线段分别为(s1,e1),(s2,e2),判
  • 2022-11-08IOU计算-纯python
    iou计算代码,纯pythonfrom:https://blog.csdn.net/leviopku/article/details/81629492#!/usr/bin/envpython#encoding:utf-8defcompute_iou(rec1,rec2):