yes, i'm sure it works, but is ((b>>1)&&!(b&1)) really much faster than (b==2)||(b==4)? Probably not. The second way makes more sense

Also, change inline to TPT_INLINE

And maybe then, this commit would be ok. I kept the code working the same, where the BRAY have to be in very specific spots, but this lets it be from any direction, including diagonally, which is probably better.