https://theultimatehang.com/hammock-hang-calculator/
When I started out, I used the calculator to make a chart giving me the tree connection height for a given distance and hammock type. The bridge hammock is often hung at a shallower angle than a gathered-end hammock. But you know how, when you made a mixed tape of songs (youth of today, "tape" - magnetic tape - was what we used before CDs and DVDs), that by the time you were done, you knew every song on the tape and its play order. So by the time you make such a chart and verify it by setting up at different tree distances, you just "know" and don't need the chart anymore.
But it was humorous to me to review my naivety. I thought, "Hanging from two trees - we are in the Pacific Northwest, how hard can it be?" Not only do they have to be within a certain distance range, but they also need clearance off to the side for tarp guying and usually brush clearance between the trees. But then you realize it's not the hammock that demands the space; it's the tarp.
Most hammock camping tarps are 11 ft long. If the hammock is 11 ft long (a usual length), hanging it near the recommended sag means the ends will be about 9 ft apart. So the 11 ft tarp gives you a foot overhang - probably enough for a light to mild rain with minimal wind - at each end. Full "Storm Mode" is another topic and not a situation I seek out - unless I want to try some new configuration/gear. I'm mostly a kayaker, so I may have to paddle in that bad weather - not the same as hiking.
But don't get hung up on absolute numbers. The main thing is, with a gathered-end hammock, that you have enough sag such that you can turn enough diagonal (it only takes a little) to get a flat lie, and your distance above the ground allows you to get in/out as easy as getting out of a chair.
Hammocks that have a built-in bug net already have a ridgeline limiting the distance apart of the hammock ends. If your hammock doesn't have a ridgeline, you can add one after you've determined the best end-to-end distance for you.