Converting Screen coordinates to UI coordinates

How to convert between screen coordinates to UI coordinates? E.g. my UI Document is 1920 x 1080, but my editor screen is smaller than that. However, I need to map some values in screen coordinates to UI coordinates back and forth.

I could convert the values myself, but I wanted to know whether there was some method already implemented that does the same.

There should be a:

RuntimePanelUtils.CameraTransformWorldToPanelRect()

and maybe other useful utilities in RuntimePanelUtils