Amateur! I can read and understand that almost right away. Now I present a better solution:
even() ((($1+1)&1))
(I mean, it's funny cause it's unreadable, but I suspect this is also one of the most efficient bash implementations possible)
(Actually the obvious one is a slight bit faster. But this impl for odd is the fastest one as far as I can tell odd() (($1&1)))