Function rayIntersectRectDistance

Distance to ray intersection with a rectangle

  • Parameters

    • rect: Vec2[]

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

    • p: Vec2

      A point

    • v: Vec2

      A vector

    Returns Num

    The distance to intersection