Function closestPointEllipse

Returns the closest point on an ellipse to a given point

  • Parameters

    • c: Vec2

      center of ellipse

    • rx: Num

      horizontal radius of ellipse

    • ry: Num

      vertical radius of ellipse

    • pt: Vec2

      the point

    Returns Vec2

    The closest point on the ellipse