Function shapeDistanceRectLine

Returns the distance between a rectangle and a line.

  • Parameters

    • rect: Vec2[]

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

    • start: Vec2

      The start point of the line

    • end: Vec2

      The end point of the line

    Returns Num

    The distance between the rectangle and the line