I recently had a problem come up in a session that I wanted to see if there was more information on. One of my players is playing a Light Domain cleric; its 1st-level Warding Flare feature says, in part (PHB, p. 61):
When you are attacked by a creature within 30 feet of you that you can see, you can use your reaction to impose disadvantage on the attack roll, causing light to flare before the attacker before it hits or misses.
The cleric recently gained the ability to fly, and wanted to use his Warding Flare feature on an ally while flying. He was 30 feet up and 20 feet out, and when I calculated the distance between him and the target it should have been about 35 feet, so I thought he was out of range.
He argued that in D&D, it shouldn't matter so long as he is not more than 30 feet out, and 30 feet higher than the target. Which means his 30-foot-range ability can extend to 42 feet total.
I allowed it because it wasn't a big deal at the time, and I would just spend time looking for the rules after the session, but I haven't found any. Are there any good clarifications on 3D situations such as these?