I'm very interested in the OP's meaning of simplicity … hopefully s/he will give a feedback in this thread. In the meanwhile, I wanted to hint at quirks in the answers above, because some of the answers are misleading. Please don't feel offended; I simply think the OP should get reasoned answers.
@Waterlimon: Comparing the effort of a single dot-product with a trigonometric function is unfair because an entire max search for N directions using the dot-product in 2D requires N*2 MULs, N ADDs, and N CMPs. This means there are 16 MULs and 8 ADDs to be compared with 1 trig function (when using the max search in both cases). Your wording lets one assume that there are 2 MULs and 1 ADD to be compared to N trig. functions. Nonetheless, your method may still be faster for the given use case though ...
@papalazaru: Is it really simply if one needs to stare 2 minutes onto 5 lines of code until understanding it? Is it really simple if you use the word "quadrant" although you compute 6 and 2 sections, resp.? Is it really simple if you need 12 elements in the mapping, although 8 are expected? And why do you use 30° and 60° as limits, which causes obviously not an equal quantization w.r.t. the angle, without any textual hint about that? And what is the check (x >= 0.0f) good for?
@aggieblue92: Please tell me why using the dot-product has the advantage of being scaleable; compared to what other method? Each additional resolution step doubles the amount of MULs and ADDs, while using the atan2 function always costs the same (because exactly 1 call is needed). Moreover, your code snippet runs a loop, and inside the loop you are computing the sine and the cosine in dependence on the loop argument (okay, you actually do not, but that is an error in your code; intentionally you use an altering angle argument). This is hardly an optimization, isn't it?