A-frame angle for swing
The angle is not particularly important.  With sufficient ground stability and fastening, you could do it with a zero angle:  a beam supported by a pair of posts.

For each configuration with a greater angle, the need for strength in the supports and anchoring decreases.  When the angle is 180 degrees, the system is completely stable without any anchors at all.  Of course, it it useless as a swing, but the point is that it is plenty strong.

If I were you, I would just build it to be as wide as is practical if space is tight, or about 30&deg; to optimize height vs. the amount of materials needed.