Function rectLineDist

Return the distance between a rectangle (defined using the bottom-left and top-right points) and a line (defined using start and end points)

  • Parameters

    • bottomLeft: Vec2

      bottom-left point of rectangle

    • topRight: Vec2

      top-right point of rectangle

    • start: Vec2

      start point of line

    • end: Vec2

      end point of line

    Returns Num

    The distance between the rectangle and the line