Function shapeDistanceRectCircle

Returns the distance between a rectangle and a circle.

  • Parameters

    • rect: Vec2[]

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

    • c: Vec2

      center of the circle

    • r: Num

      radius of the circle

    Returns Num

    The distance between the rectangle and the circle