If a resonant cavity resonates at half of the wavelength of its width, which is easy to understand with a spherical resonant cavity, but how can there be one resonant frequency of a cavity resonator that is the shape of a cuboid/box when there are an infinite number of different distances that vary all the way from the two farthest corners, to the closest distance between 2 walls, and if they all resonate at the half wavelength that's a lot of frequencies. So how can there be just 1 resonant frequency for the square prism, cuboid?