Function shapeDistanceRects

Return the distance between two rectangles.

  • Parameters

    • rect1: Vec2[]

      The top-right, top-left, bottom-left, bottom-right points (in that order) of the first rectangle.

    • rect2: Vec2[]

      The top-right, top-left, bottom-left, bottom-right points (in that order) of the second rectangle.

    Returns Num

    The distance between the two rectangles