Large creatures flanking medium

Flanking says:

To flank a foe, you and your ally must be on opposite sides of the creature. A line drawn between the center of your space and the center of your ally's space must pass through opposite sides or opposite corners of the foe's space

It is all simple when medium creatures without reach are flanking Small or larger creatures.
Pink are the Large enemies, green the flanked Medium creature:

A is clear, the line between the centers goes through the sides
B is questionable, the line between the centers only touches the sides of the flanked creature's space, does not really go through them

So the question: is M flanked in case B?

• Wait, so two H creatures in the situation like in the right picture wouldn't flank the M creature?! weird. Oct 13, 2023 at 18:10

Corners are part of the side

The rules for cover say:

Usually, the GM can quickly decide whether your target has cover. If you're uncertain or need to be more precise, draw a line from the center of your space to the center of the target's space. If that line passes through any terrain or object that would block the effect, the target has standard cover

There is an image to clarify cover. In this image, a line that passes through the corner of an obstacle is counted as crossing the obstacle (#3, below). So passing through the corner of something, here terrain or an object, or in the case of flanking a line, counts as passing through or crossing it.

Therefore, passing through the end corners of two opposite lines counts as passing through those lines, and the medium creature in both your examples is being flanked by the two large creatures.

(Given that these sort of questions have been plaguing us since pathfinder 1e at the very least, it is somehow baffling to me that the publishers of these systems cannot provide some more direct examples on it in the rules.)

• It might be one thing DnD5e does better/clearer: "A Large or larger creature is flanking as long as at least one square or hex of its space qualifies for flanking" (by lellooooo) Oct 13, 2023 at 14:52
• Pathfinder 1e was even more explicit, "If the line passes through opposite borders of the opponent’s space (including corners of those borders), then the opponent is flanked." Oct 13, 2023 at 17:59

The rules are guidelines, not absolutes

The rules quote you have seems to assume Medium characters, which isn't always the case.

If a rule seems to have wording with problematic repercussions or doesn’t work as intended, work with your group to find a good solution, rather than just playing with the rule as printed.

Playing the Game reminds us that the exact wording does not matter so much as the intent and effects of the rules. In this case, it is pretty simple to determine that larger creatures can flank a smaller creature they have surrounded, even if they aren't on exact opposite sides of the subject.

• I thought I remembered text specifying that the rules were written assuming Medium and may need adjustment, but I can't find it at the moment. I'll edit if I find it again (or if someone could link me to the right place haha) Oct 13, 2023 at 17:30