The “macro overloading” idiom
Here’s a neat trick to create an “overloaded macro” in C, such that
M(x) does one thing and M(x, y) does something else. For example,
we could make a macro ARCTAN such that ARCTAN(v) calls atan(v)
and ARCTAN(y,x) calls atan2(y,x).
#define GET_ARCTAN_MACRO(_1, _2, x, ...) x
#define ARCTAN(...) GET_ARCTAN_MACRO(__VA_ARGS__, atan2, atan)(__VA_ARGS__)

